Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I want to color a card conditionally based on a measure which is a percentage.
I have 2 percentage values for two sets of population say "High Cost" and "Regular"
I want to show the High Cost Card value in Red if its percentage exceeds the Regular percentage else in Yellow.
I am unable to do this with "States Card"- Not sure if I am doing Anything wrong.
Let me know if there is any other better way to do this.
Find below screen shots-
Hi @kdesai, this is the link to the OKViz documentation: https://okviz.com/blog/states-in-custom-visuals/
I ran into the same issue and apparently, you need to place Language % HCP on "States Measure" and Language % Regular on "States" again. That will change the States panel under Formatting so you don't need to apply static values.
Also to change the background, you should change "Affect" to "Background" instead of "Data label". Mine is not working as this visual seems a bit fiddly, but if I find out the solution will let you know. Hope this helps.
Hi kdesai,
Please refer to conditional formatting: https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting.
Regards,
Jimmy Tao
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 64 | |
| 31 | |
| 26 | |
| 25 |