Forum Discussion
jcs93
7 years agoHelper I
Calculated Column IF Statement using "IN" for multiple values
Looking for some assistance to figure out why I'm not getting what I'm expecting. I'm building a calculated column using values selected within slicers. It works great if only one value is selec...
- 7 years ago
Hi jcs93 ,
To create a measure as below.
Criteria1 = var th = VALUES(TextHereTable[TextHere]) var mt = VALUES(MoreTextTable[MoreText]) RETURN SWITCH(TRUE(), MAX(PowerBITest[TextHere]) in th && MAX(PowerBITest[MoreText]) in mt , "Meets Criteria", "Does Not Meet Criteria")Regards,
Frank
v-frfei-msft
7 years agoCommunity Support
Hi jcs93 ,
To create a measure as below.
Criteria1 =
var th = VALUES(TextHereTable[TextHere])
var mt = VALUES(MoreTextTable[MoreText])
RETURN
SWITCH(TRUE(),
MAX(PowerBITest[TextHere]) in th
&& MAX(PowerBITest[MoreText]) in mt
, "Meets Criteria", "Does Not Meet Criteria")
Regards,
Frank
jcs93
7 years agoHelper I
Thank you. Using your code as a measure corrects my issue, but leaves one behind.
I didn't show in my demo file, but I need the ability to display the Criteria in a stacked bar chart. Sadly, I cannot insert a measure into the legend field in a stacked bar chart (or any other field).
Please advise.
Thank you,
Jim