Forum Discussion
Conditional Formatting based on another row value
Hello. I want to visualize the indicators of a set of companies over time, but color the information of these indicators (numbers and texts) according to an internally defined category (HIGH, MEDIUM or LOW).
I have structured a dataset that contains the name of the company, the name of the indicator and the type of information that the periods contain ("VALUE" or "CATEGORY"):
Dataset:
And, I would like to set up a visualization that displays the "value" of these indicators over time, but that their color depends on their "category":
Visualization:
Although in Excel this would be easy using conditional formatting: relating each cell of the "indicator's value" with its corresponding "indicator's category" in a hidden table, in Power BI I have not found a way to do it. I really appreciate if you can suggest me ideas on how to do it.
1 Reply
- amitchandakSuper User
Luis24 , You can consider the color measure and use that in conditional formatting using the field value option
Color = Switch( True() ,
Max(Table[Status]) < 200 ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
) ,
Max(Table[Status]) < 500 ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
) ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
)
)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