Forum Discussion
Anonymous
6 years agoNot applicable
How to write a DAX function when a Slicer value is selected/included?
I have a Slicer, i.e. I want to write a logic DAX function using IF() like: If "Successful" is selected, then do A, otherwise do B "Successful" could be selected as a single or one of mu...
- 6 years ago
Anonymous ,
You may create a measure using dax below:
Result = IF(CONTAINSSTRINGEXACT(CONCATENATEX(ALLSELECTED('Table'), 'Table'[project_status], ""), "Successful") = TRUE(), "A", "B")Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 6 years ago
Anonymous
I see v-yuta-msft has provided a solution (I wasn't even aware of the function CONTAINSSTRINGEXACT!)
Just as an alternative, I worked on a different approach:
PaulDBrown
6 years agoCommunity Champion
Anonymous
I see v-yuta-msft has provided a solution (I wasn't even aware of the function CONTAINSSTRINGEXACT!)
Just as an alternative, I worked on a different approach:
Anonymous
6 years agoNot applicable
Thanks.
In my case, need to change the last line into: if(calc>=1,"YES","NO")