Forum Discussion
conditional cell color in Matrix based on first value
I am hoping there is an easy way to accomplish this task. I want to color code this matrix table for anything that is for example Very Serious Risk and Low Contorl as red and say anything as Low Risk and Very Strong Control as green.
Is there an easy way to do this with a custom field or with DAX code to force the cell color based on the x and y values?
I am a begginer and this was my first challenge 🙂
1 Reply
- amitchandak
Super User
aehrenwo , You an create a measure like
Switch( True(),
Max(Table[risk Rating] ) =" Very Serious Risk" && Max(Table[risk type] ) ="Low Risk", "Red",
Max(Table[risk Rating] ) =" Very Serious Risk" && Max(Table[risk type] ) ="Very Strong Control", "Green",
"white"
)
Use that in conditional formatting using field value option
How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pane-66e0afcb15f3