Forum Discussion
Anonymous
3 years agoNot applicable
DAX formula for conditional formatting column chart
I hope someone can help, cause sometimes propagation and filter context is difficult. Regards Ron
- 3 years ago
Here's the measure that works:
Colour3 =var _differ = MAXX(ALLSELECTED('KPI Dimension'),1-[KPI perc])var _target = [Check Against Target]RETURNSWITCH(TRUE(),_target >=1, "Green",_target < 1 && _target >=_differ, "Purple",_target < _differ , "Red")
Anonymous
3 years agoNot applicable
Hi Padycosmos thanx for you answer
I changed the measure as follows (by the way I replaced Amber by Purple, because for Amber it returs Blue, which seems odd)
Color =
var _differ = 1 - [KPI perc]
RETURN
SWITCH(
TRUE(),
[Check Against Target] >= 1, "Green",
[Check Against Target] >= _differ && [Check Against Target] < 1, "Purple",
[Check Against Target] <= _differ, "Red"
)
Now it returns this
So it is already better but 202202 should be Red.
The funny thing is, when clicking 202202 in the column chart and putting the measure Color in the table, it shows Red
That's really odd
So it is already better but 202202 should be Red.
The funny thing is, when clicking 202202 in the column chart and putting the measure Color in the table, it shows Red
That's really odd
Padycosmos
Solution Sage
3 years agoYou have >=_differ in "Purple" and <= _differ in "Red", you need to remove one of the = . Then it should work
- Anonymous3 years agoNot applicable
Hi Padycosmos
unfortunately no change
I changed[Check Against Target] <= _differ, "Red"into[Check Against Target] < _differ, "Red"The tabel shows Red, te column chart Purple for 202202- Padycosmos3 years ago
Solution Sage
Could you please move "red" as the first statement, "purple" as the second and "green" as the last and try again?
- Anonymous3 years agoNot applicable