Forum Discussion
Conditional Formatting for Bar Charts
- 7 years ago
Hi Anonymous
You could create a measure like below, essentially its your rules with colours replaced with numbers.
coloursX = SWITCH( TRUE, [Enabled 2019/20] >= [Savings Targets 2019/20], 1, --Blue [Enabled 2019/20] >= [2019/20 Current Month Target], 2, -- Green MONTH( EDATE( NOW(), -3 ) ) < 7 && [Enabled 2019/20] >= ( [2019/20 Current Month Target] * 0.7 ), 3, --Amber 0 --Red )Next, in the Visualization Pane > Format > Data Colors, Click on the 3 dots and Select Conditional Formating to open the options ( as on the sreenshot below )
Once in the Conditional Formatting settings, just make sure you set everything as below
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
Hi Anonymous
You could create a measure like below, essentially its your rules with colours replaced with numbers.
coloursX =
SWITCH(
TRUE,
[Enabled 2019/20] >= [Savings Targets 2019/20], 1, --Blue
[Enabled 2019/20] >= [2019/20 Current Month Target], 2, -- Green
MONTH( EDATE( NOW(), -3 ) ) < 7 && [Enabled 2019/20] >= ( [2019/20 Current Month Target] * 0.7 ), 3, --Amber
0 --Red
)Next, in the Visualization Pane > Format > Data Colors, Click on the 3 dots and Select Conditional Formating to open the options ( as on the sreenshot below )
Once in the Conditional Formatting settings, just make sure you set everything as below
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
- Anonymous7 years agoNot applicable
Much appreciated this works a charm. I added sum() to the columns within the measure and this cleared any errors I subsequently had.
Thanks again. Mark
- Mariusz7 years agoCommunity Champion