Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |