Forum Discussion
uvil
7 years agoResolver I
Conditional formatting with filters
Hey all, I have a Matrix table formed by different zone Groups, that have different % objectives, and when I apply a Conditional Formatting to the table I can't give them different values dependi...
- 7 years ago
Hi, try with this:
A measure to apply the color :
Color = VAR _Sales = SUM ( Sales[Sales] ) VAR _Group = SELECTEDVALUE ( Sales[Group] ) RETURN SWITCH ( _Group, "Group 1", SWITCH ( TRUE (), _Sales <= 0,18, "#ff0000", _Sales < 0,21, "#ffa500", "#00ff00" ), "Group 2", SWITCH ( TRUE (), _Sales <= 0,14, "#ff0000", _Sales < 0,18, "#ffa500", "#00ff00" ), "Group 3", SWITCH ( TRUE (), _Sales <= 0,24, "#ff0000", _Sales < 0,28, "#ffa500", "#00ff00" ) )Note: You can improve this if work with a table and the range color by each group.
Finally , in conditional format Select Format by Field Value and choose the measure (In this case Color)
Ready
Victor
dedelman_clng
7 years agoCommunity Champion
I've had to do something similar, where I calculated the variance from the objective in a hidden column/measure, and did conditional formatting based on the hidden column.
This is, of course, assuming that there is some uniformity among the colors as relates to the variance.
If this explanation doesn't make sense I'll try to dig up the report where I did it.
Hope this helps
David