Forum Discussion
Measure as filter with multiple groups
Hi all,
I have created a traffic light measure with multiple condition which are already based on other measure calculations.
The idea is to use the measure as Slicer I have read there is a workaround to create table out of the measure output, but I am sure this could work with multiple conditions.
My measure looks like this :
Here are a few examples
Solved: Measure as Slicer - Workaround? - Microsoft Power BI Community
Solved: How to use a measure as slicer? - Microsoft Power BI Community
Regards,
Ritesh
Regards,RiteshMark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users
3 Replies
- ribisht17Super User
Here are a few examples
Solved: Measure as Slicer - Workaround? - Microsoft Power BI Community
Solved: How to use a measure as slicer? - Microsoft Power BI Community
Regards,
Ritesh
Regards,RiteshMark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users - ybyb23Frequent Visitor
Hi,
Thanks for your answer. Still through these examples I am facing some errors to get the slicer based on the measure that I have created. Basically thsis how my table looks like
Dim1 dim2 dim3 A B C Traffic Bread flour 14587 0.69% -100% -100% Price decrease < A decrease Bread flour 14759 -8,32% -100 -100 Price decrease < A decrease Bread flour 45697 Non Matching pair Bread flour 13545 Non matchin pair Bread flour 54987 non matching pair Bread flour 24687 non mtaching pair based on what I have understood that's what I have to do:
First : Create a table, I did in my case it will be
Traficlight_Name SlicerValue
Non Matching Pairr 0
Price decrease while A increase 1
Price decrease > A decrease 2
Price increase < A increase 3
Price increase while A decreased 4
Price decrease < A decrease 5
Price increase > A increase 6
I am missing the second step which I don't really understand if I have to write down again the conditions in my previous measure or what really has to be done in this step ?
- AnonymousNot applicable
Hi ybyb23 ,
Here is my test table:
Table:
Slicer:
1.create a slicer visual with slicervalue
2.create a dax formula and add it to table visualTraffic = VAR _slicerval = SELECTEDVALUE ( Slicer[SlicerValue] ) RETURN SWITCH ( TRUE, MAX ( 'Table'[A] ) + MAX ( 'Table'[B] ) + MAX ( 'Table'[C] ) = BLANK () && _slicerval = 0, "Non Matching Pair", MAX ( 'Table'[C] ) < 0 && MAX ( 'Table'[A] ) > 0 && MAX ( 'Table'[B] ) < 0 && _slicerval = 1, "Price decrease while A increased", MAX ( 'Table'[B] ) < 0 && MAX ( 'Table'[B] ) < MAX ( 'Table'[A] ) && _slicerval = 2, "Price decrease > A decrease", MAX ( 'Table'[B] ) < 0 && MAX ( 'Table'[B] ) > MAX ( 'Table'[A] ) && _slicerval = 3, "Price increase < A increase", MAX ( 'Table'[C] ) > 0 && MAX ( 'Table'[A] ) < 0 && MAX ( 'Table'[B] ) > 0 && _slicerval = 4, "Price increase while A decreased", MAX ( 'Table'[B] ) < 0 && MAX ( 'Table'[A] ) < 0 && _slicerval = 5, "Price decrease < A decrease", MAX ( 'Table'[B] ) > 0 && MAX ( 'Table'[A] ) > 0 && _slicerval = 6, "Price increase > A increase" )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.