Forum Discussion
Matrix table conditional formatting with one measure and multiple dimensions in columns
Hi,
I would like to ask for some help with a problem on conditional formatting.
I have a matrix table with this setup:
Rows: Markets
Columns: Item, Week
Value: Value_Switch
Value_Switch is calculated based on the selected dimensions for the Columns section, using FILTER and SELECTEDVALUE().
My objective is to apply conditional formatting on the matrix table, but for each item and week separately. When I use conditional formatting based on Value_Switch then the values for the whole table are considered and gradient is applied disregarding the different weeks and items which distorts the view.
I would like to achieve the result as depicted in the screenshot below in which each column is separately considered for the conditional formatting.
Thanks a lot for your help 🙂
1 Reply
- amitchandak
Super User
F_B , for that measure-based field conditional formatting, is a better option
Create a measure like the given example and then use conditional formatting using 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 "
)
)Measure =
Switch(true(),
max(Table[Column]) = "R1" , "Red" ,
max(Table[Column]) = "R2" , "Green" ,
max(Table[Column]) = "R3" , "Pink "
)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