Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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!
Solved! Go to Solution.
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.
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.
@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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |