Forum Discussion
Filter for multiple values using a measure _ DAX Expression Help
- 8 years ago
Hi groffia,
If you have to list the values explicitly, you can try it out like this:
STPU Overall:= CALCULATE ( [Stop Time Per Unit], DimID[Cause Group] IN { BLANK (), "Unknown", "Supply Chain", "Design", "Engineering", "etc" } )If the measure can read the values from a column, you can try it like this:
a = CALCULATE ( [Stop Time Per Unit], DimID[Cause Group] IN VALUES ( 'table1'[column] ) )Note: table1 could be created by formula or by hand.
Best Regards,
Dale
Hi groffia,
If you have to list the values explicitly, you can try it out like this:
STPU Overall:=
CALCULATE (
[Stop Time Per Unit],
DimID[Cause Group]
IN { BLANK (), "Unknown", "Supply Chain", "Design", "Engineering", "etc" }
)If the measure can read the values from a column, you can try it like this:
a =
CALCULATE (
[Stop Time Per Unit],
DimID[Cause Group] IN VALUES ( 'table1'[column] )
)Note: table1 could be created by formula or by hand.
Best Regards,
Dale
- groffia8 years agoHelper I
I knew there was a simpler way... your solution worked flawlessly. Thank you for your help!
-Steve
- Anonymous7 years agoNot applicable
Hi Dale v-jiascu-msft, what if I want to use the values from that other table and do some calculation like below , its not working as I have written here ... please let me know if you need me to explain my scenario more?
a = CALCULATE ( [Stop Time Per Unit] * values('table1[column2]), DimID[Cause Group] IN VALUES ( 'table1'[column] ) )- Anonymous7 years agoNot applicable
never mind made it to work refering to this link https://community.powerbi.com/t5/Desktop/DAX-Using-variables-inside-iterators-such-as-SUMX/td-p/521044