Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

value compare different column in same table

i have table name  called  Master file.My data table looks like below.  i want compare the values .if  IN_table ,Out_Table ,Eo_In_table , Eo_Out_table ,CMN   all same its return TRUE .  if Not matached N_table ,Out_Table ,Eo_In_table , Eo_Out_table ,CMN   its return False.

 

ID    Columnztype                  IN_table        Out_Table         Eo_In_table           Eo_Out_table            Year             CMN       

11    Adjustable_Shipment          0                0                           0                          0                          2021              0

11    Adjustable_Shipment          0                0                           0                          0                          2022              0

11     Fixed_Shipment               326280       326280               326280                326280                    2021            326280
11     Fixed_Shipment              1017720      1017720            1017720              1017720                   2022         1017720

11    Fixed_PLB                     36021816       36021816           36021816          36021816                   2021        65029906

11    Fixed_PLB                    40041259        40041259           40041259           40041259                  2022         41468899            

 

Expected Output looks like 

ID    Columnztype                  IN_table        Out_Table         Eo_In_table      Eo_Out_table  Year             CMN        Status 

11    Adjustable_Shipment          0                0                           0                     0                2021              0             True 

11    Adjustable_Shipment          0                0                           0                     0               2022              0              True 

11     Fixed_Shipment               326280       326280               326280             326280        2021            326280      True    
11     Fixed_Shipment              1017720      1017720            1017720            1017720       2022         1017720       True 

11    Fixed_PLB                     36021816       36021816           36021816         36021816       2021        65029906      False 

11    Fixed_PLB                    40041259        40041259           40041259         40041259      2022         41468899     Fasle

 

 

 i have tired below measure getting Error :

Check one = var _A=CALCULATE(MAX(Master [CMN ]),
FILTER(
Master ,
Master [IN_Tables]= MAX(Master [Out_Tables]) &&
Master [Eo_In_table]=MAX('Master '[ Eo_Out_table])
))

REturn
if(MAX(Master [ICMN ]) =_A,TRUE(),False())

    

 

what mistake i did?  looking for support . thanks in advance.

 

1 ACCEPTED SOLUTION
ValtteriN
Community Champion
Community Champion

Hi,

Here is a pretty straightforward way to do this (albeit not the most elegant):

Test Match =
var col1 = SELECTEDVALUE('Table (3)'[Column1])
var col2 = SELECTEDVALUE('Table (3)'[Column2])
var col3 = SELECTEDVALUE('Table (3)'[Column3])
var col4 = SELECTEDVALUE('Table (3)'[Column4])


return

IF(col1=col2&&col2=col3&&col3=col4,TRUE(),FALSE())
 
Data:
ValtteriN_0-1641814352705.png

End result:

ValtteriN_1-1641814373975.png


I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@ValtteriN  thank you so much

ValtteriN
Community Champion
Community Champion

Hi,

Here is a pretty straightforward way to do this (albeit not the most elegant):

Test Match =
var col1 = SELECTEDVALUE('Table (3)'[Column1])
var col2 = SELECTEDVALUE('Table (3)'[Column2])
var col3 = SELECTEDVALUE('Table (3)'[Column3])
var col4 = SELECTEDVALUE('Table (3)'[Column4])


return

IF(col1=col2&&col2=col3&&col3=col4,TRUE(),FALSE())
 
Data:
ValtteriN_0-1641814352705.png

End result:

ValtteriN_1-1641814373975.png


I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.