Forum Discussion
Kamill11
Helper I
4 years agocompare columns with text values in different queries (DirectQuery mode)
Hi everyone, I need to do measure for: if the value in column 1 is contained in column 2 then it displays "YES", if none it displays "NO", Columns are in different queries, and they both are in...
- 4 years ago
use MAX or MIN instead of SUM.
You have not mentioned what your data model looks like. Other measure functions may be more appropriate.
- 4 years ago
Hi Kamill11 ,
Create a measure as below:
Measure = VAR _tab = ALL ( 'Table'[Column1] ) VAR _col1 = SELECTEDVALUE ( 'Table'[Column2] ) RETURN IF ( _col1 IN _tab, "Yes", "No" )And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
v-kelly-msft
Community Support
4 years agoHi Kamill11 ,
Create a measure as below:
Measure =
VAR _tab =
ALL ( 'Table'[Column1] )
VAR _col1 =
SELECTEDVALUE ( 'Table'[Column2] )
RETURN
IF ( _col1 IN _tab, "Yes", "No" )
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!