Forum Discussion
andrea100
1 year agoHelper I
Conditional formatting on bar chart for each bar? Is this possible?
Hi, I am trying to create a type of bar chart, where each bar may be coloured depending on conditions and the measures I've created S1, S2, S3, S4. Below is an example of the bar chart. ...
Anonymous
1 year agoNot applicable
Hi, andrea100
Thanks for Arul's reply. You can refer to his method, or you can try the following measure.
DAX:
Color =
VAR _row = SELECTEDVALUE('Table'[Row])
VAR _re =
SWITCH(
TRUE(),
[S1] = 1 && _row = "Below","Red",
[S2] = 2 && _row = "Marginal","Yellow",
[S3] = 3 && _row = "Meets","Orange",
[S4] = 4 && _row = "Exceed","Green",
"Blue"
)
RETURN
_re
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum