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
Vvelarde
7 years agoCommunity Champion
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
uvil
7 years agoResolver I
Hey,
After a few hours working with this topic i'll managed to find the solution,
Thanks a lot! It works :D