Forum Discussion
Conditional Formatting Based on Measure using Slicer Selection Without Visual Interaction
- 1 year ago
Click here to download a solution from Onedrive
How it works ...
Create a detached picklist table
Create a measure
RAG = var mypicks = VALUES(picklist[Customers]) var mygraph = SELECTEDVALUE(yourdata[Customers]) RETURN IF(mygraph in mypicks, "Red")Add conditional formating to the column
Please click the thunbs up and the [accept solution button].
Many thanks!
Hi speedramps ,
Thank you very much for providing the solution along with the example.
However after replicating the setup the conditional formating measure lists all values as red instead of only the selected one. I have tried disabling/enabling the interaction of the slicer with the visual but the color is the same for all selections (red).
I have tried making an active relationship betwen the tables and inactivating it with the same result.
To elaborate my setup is the same as in your example:
The visual holds the dataset values
The slicer holds the picklist table.
Any ideeas on what to double check?
Thanks again!
Hi again MDM
Sorry you are still having problems
Please click on the Onedrive link in my original answer. Check it works ok.
Once you proved to yourself that the solution works, then repeat my instructions more carefully.
Don't make changes (eg uses relationships).
Focus yourself on copying the instructions exactly. It will work.
- mdm20251 year agoHelper I
Hi speedramps ,
You are correct. Thank you againg for following up.
Not sure what I have changed but it works now 😄.
I have also update the DAX formula with additional conditions among which is having the blue default if no values from the slicer is selected( in case heplful for other community members in the future).
All the best!