Forum Discussion
Compare column values and output the result using DAX
- Anonymous3 years ago
Hi ravdha85 ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Measure = VAR tmp = SUMMARIZE ( ALL ( 'Table' ), 'Table'[Items], "Cnt", COUNTROWS ( 'Table' ) ) VAR tmp1 = CALCULATETABLE ( VALUES ( 'Table'[Items] ), FILTER ( tmp, [Cnt] >= 2 ) ) VAR _rst = SELECTEDVALUE ( 'Table'[Restaurant] ) VAR _item = SELECTEDVALUE ( 'Table'[Items] ) RETURN IF ( _item IN tmp1, _rst, BLANK () )3. add a table visual with fields and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 3 years ago
Thanks Anonymous that worked🙂
Hi ravdha85 ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Measure =
VAR tmp =
SUMMARIZE ( ALL ( 'Table' ), 'Table'[Items], "Cnt", COUNTROWS ( 'Table' ) )
VAR tmp1 =
CALCULATETABLE ( VALUES ( 'Table'[Items] ), FILTER ( tmp, [Cnt] >= 2 ) )
VAR _rst =
SELECTEDVALUE ( 'Table'[Restaurant] )
VAR _item =
SELECTEDVALUE ( 'Table'[Items] )
RETURN
IF ( _item IN tmp1, _rst, BLANK () )
3. add a table visual with fields and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ravdha853 years agoFrequent Visitor
Thanks Anonymous that worked🙂