Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
andrea100
Helper I
Helper I

Issues conditional formatting coloring with a sum of measures

Hi community, I have been working on this visual for some time now. I’ve had members help me along the way which has saved me greatly. I am having issues with implementing conditional formatting on a bar chart depending on measures - I have been trying to create a type of bar chart where each bar may be coloured depending on measures. 

This is how the bar chart looks like:

andrea100_0-1737747576276.png

 

I have used this for conditional formatting:

Conditional Formatting Measure = 
Switch(TRUE(),
SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Meets " && [Meets%]+[Exceeds%] > 90, "orange",
SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Marginal" && [Marginal%] + [Below%] > 40, "yellow", 
SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Exceeds" && [Exceeds%] > 30, "green", 
SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Below" && [Below%] > 15, "red",  "grey")

When there is a sum used in the condition, the bar does not change colour – the sum is not taken into account. I have many instances where Marginal+Below>40 and Meets+Exceeds>90 but the bar doesn't change colour. 

Here is a link to a sample workbook: google drive 

I would really appreciate any help and guidance on this. I don't understand why the sum is being ignored. 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@andrea100 

Your works, i changed the values and tested, it's fine.  Please refresh your model and test

Fowmy_0-1737785007976.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

7 REPLIES 7
Fowmy
Super User
Super User

@andrea100 

Your works, i changed the values and tested, it's fine.  Please refresh your model and test

Fowmy_0-1737785007976.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy Yes I do see now that when the values are changed it works. Any idea why it does not colour in this case or for these values? What am I missing?

In this case, Exceeds+Meets>90, but why does it not highlight?

andrea100_0-1738000452437.png

@andrea100 

Becasue it does not go above 90, Exceeds = 0 and Meets = 53.61, total is 53.61

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy  Thank you very much for looking into this by the way. 
I'm wondering why is it calculating so that Exceeds = 0, when actually, Exceeds = 41.47
I am looking for the bar Meets to be coloured since Exceeds = 41.47 and Meets = 53.61, where the sum is 95.08 (greater than 90).

@andrea100 

Please check your Measure [Exceeds], as per table visual below the column chart, it shows zero.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy Okay I see what you mean now. My intent of creating the measures [Exceeds%], [Meets%] and so on, was to capture the % total of each performance level as I wasn't able to figure another way to capture it. I see it has caused another layer of problems.

@andrea100 

Hope I was able to clarify the issue based on what you presented. I hope you will be able to look into the issues with your measres.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.