Forum Discussion
Change conditional formatting values based on slicers
Hi All,
I cant share data on this one due to GDPR but hopefully someone can help.
I have a report that uses the conditional formatting for card background colour but I need the values to change based on a slicer selection.
For example, If its one team selected in the slicer, I need green background colour for say 85% and below on the card visulisation. But other teams need to green only for 15% and below but amber or red above 15%.
Is there a way to do this?
Many Thansk in advance!
- Anonymous6 years ago
Hi Anonymous ,
You can create a measure to get the selected value of slicer and set a rule for conditional formatting.
For example:
Measure = IF(SELECTEDVALUE('Table'[teams])="A",1,0)Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
Anonymous , you can create a color measure that can include the value from slicer too and return a color
like
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))In conditional formatting use the "field" option and this measure
How to deal with a slicer value
- AnonymousNot applicable
Hi Anonymous ,
You can create a measure to get the selected value of slicer and set a rule for conditional formatting.
For example:
Measure = IF(SELECTEDVALUE('Table'[teams])="A",1,0)Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.