Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello All,
I really need urgent help in conditional formatting (Background)
I have a matrix visual which shows 2 categories and based on that I have calculated change
sales price,count,avg and Change all are measures
on Change I have to apply the background color based on below condition
If values in the change < -50% then dark red
-50% to 0% should be red
0% to 50% green
> 50% dark green
what I have done
I was not able to apply on negative % to I started with positive
if value >0(percent) and <= then 50(percent) dark green
if value >50(percent) and <= then 100 (percent) green
still with the above logic, it is not formatting the values
Please let me know how can I add those buckets
Solved! Go to Solution.
Hi @Anonymous ,
As per our Understandings you are looking for Background color change on Measure witch if else Condition
This is My Sample table:
You can achieve this by Creating a column Using Below DAX Expression and using it in Conditional Formatting.
ColorColumn =
var percentageValue = [% Percentage]
var DarkRed =
"#8b0000"
var red =
"#FF0000"
var green =
"#00ff00"
var darkGreen =
"#006600"
return
IF(percentageValue> 0 && percentageValue <
1, DarkRed,IF(percentageValue>1 && percentageValue<5, red,IF(percentageValue>5
&& percentageValue <45 , green,IF(percentageValue>45,darkGreen))))
Now Just use this color Column in conditional Formatting
Choose the Colour Column :
This will give below result:
If possible you can provide us a sample pbix report with your data structure, so we can check and help you to achieve this in your report as well.
If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.
Thanks!
Inogic Professional Service Division
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Hello @SamInogic
Thank you so much for the help I really appreciate that you helped me this fast.
Just want to confirm that power does not support conditional formatting for negative percentages right?
because it is giving me an error saying logical error. I know you have told me the workaround way. But just want to clarify.
And once again Thank you so much for all the help.
Hi @Anonymous
Yes, we cannot use negative values when there's a percent is selected to the Rule, However you can try this with Number,
Thanks!
Inogic Professional Service Division
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Hi @Anonymous ,
As per our Understandings you are looking for Background color change on Measure witch if else Condition
This is My Sample table:
You can achieve this by Creating a column Using Below DAX Expression and using it in Conditional Formatting.
ColorColumn =
var percentageValue = [% Percentage]
var DarkRed =
"#8b0000"
var red =
"#FF0000"
var green =
"#00ff00"
var darkGreen =
"#006600"
return
IF(percentageValue> 0 && percentageValue <
1, DarkRed,IF(percentageValue>1 && percentageValue<5, red,IF(percentageValue>5
&& percentageValue <45 , green,IF(percentageValue>45,darkGreen))))
Now Just use this color Column in conditional Formatting
Choose the Colour Column :
This will give below result:
If possible you can provide us a sample pbix report with your data structure, so we can check and help you to achieve this in your report as well.
If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.
Thanks!
Inogic Professional Service Division
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
71 | |
38 | |
31 | |
27 |
User | Count |
---|---|
91 | |
50 | |
44 | |
40 | |
35 |