Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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:
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.
Solved! Go to Solution.
@andrea100
Your works, i changed the values and tested, it's fine. Please refresh your model and test
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@andrea100
Your works, i changed the values and tested, it's fine. Please refresh your model and test
⭕ 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
Becasue it does not go above 90, Exceeds = 0 and Meets = 53.61, total is 53.61
⭕ 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.
⭕ 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.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
12 | |
11 | |
8 | |
8 |
User | Count |
---|---|
24 | |
13 | |
12 | |
11 | |
10 |