Forum Discussion
How to apply conditional formatting to individual Column Category in a clustered column chart?
- 1 year ago
Not sure of how to colour the slices of a pie chart but this measure will colour the data labels by going to Format > Details Labels > Values > Color. Ratio is the same measure as shared earlier.
Colour measure = if(MIN('Dup Data'[PFW])<>"Pass",if([Ratio]<=0.08,"Green",if([Ratio]<=0.10,"Yellow","Red")),"Grey")Hope this helps.
The PBIX file is available at the following link
https://filebin.net/t9vmj7we59n3xgpi/ConditionalFormatting.pbix
The rules are as follows:
My attempt is to have "Good Standing" column staying at blue (say that's our school color, we always want it blue). "Probation/Suspension" changes colors with the above rules. Thank you!
Hi,
I wrote this measure
Colour measure = if(MIN(Undup[PROB/SUSP])="Good standing","Blue",if([StudentCount]>10,"Red",if([StudentCount]>8,"yellow","Green")))Then under Visual > Column > fx, did this
to get this result
- frost7891 year ago
Helper II
I appreciate your help. However, the conditions are not correct (please refer to the "rules" screenshot. They are in percentages). It's red only if:
("Probation/Suspension" count)/ ("Probation/Suspension" Count + "Good Standing" Count) >= 0.1 then "red"
("Probation/Suspension" count)/ ("Probation/Suspension" Count + "Good Standing" Count) >= 0.08 but less than 0.1 then "yellow"
- Ashish_Excel1 year ago
Solution Supplier
Hi,
Try these measures
All student count = CALCULATE([StudentCount],ALL(Undup[PROB/SUSP]))Ratio = DIVIDE([StudentCount],[All student count])Colour measure = if(MIN(Undup[PROB/SUSP])="Good standing","Blue",if([Ratio]>0.1,"Red",if([Ratio]>0.08,"yellow","Green")))Drag the colour measure to Visual > Column fx
- frost7891 year ago
Helper II
Thank you for your reply, but there has been a slight change in the requirements.
Is it possible to accomplish this in a pie chart?
Pass pie is always gray (#e6e6e6)
If Fail percentage is <=8%, the Fail pie should be green
If Fail percentage is >8% and <=10%, the Fail pie should be yellow
If Fail percentage is > 10%, the Fail pie should be red
If Withdraw percentage is <=8%, the Withdraw pie should be green
If Withdraw percentage is >8% and <=10%, the Withdraw pie should be yellow
If Withdraw percentage is > 10%, the Withdraw pie should be red
https://filebin.net/k73pbolb3kmvgolp/PieChartConditionalFormatting.pbix