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.
I have a report in Power BI Desktop (May 2019) that has several visuals where the data colour is assigned via a simple measure (green if better than last year, red if worse, yellow if the same).
This is working perfectly in desktop but when I publish up to the Service the visuals just display as one colour with no formatting.
What am I doing wrong?
Solved! Go to Solution.
hi, @HMJSomerset
Adjust your formula as below:
Spend Colour KPI = SWITCH( TRUE(), [Total Spend] < [Total Spend SPLY], "#C73672", [Total Spend] > [Total Spend SPLY], "#009CA6", "#FFFF00" )
For why your formula works well in power bi desktop but not works in power bi service, I have submitted it to power bi product team, I will post it here once I get a reply.
Best Regards,
Lin
hi, @HMJSomerset
I have tested on my side, It works well not reproduce the issue.
Could you share your simple sample pbix file for us have a test, there should be something wrong in other.
Best Regards,
Lin
Sorry - I can't share the original pbix file.
I will have to create a new file with anonymised data if I am to share it.
I can't work out how to share the pbix file but I have uploaded screenshots of the desktop and web reports.
To reproduce the error I create two simple measures Total Spend and Total Spend SPLY
hi, @HMJSomerset
Adjust your formula as below:
Spend Colour KPI = SWITCH( TRUE(), [Total Spend] < [Total Spend SPLY], "#C73672", [Total Spend] > [Total Spend SPLY], "#009CA6", "#FFFF00" )
For why your formula works well in power bi desktop but not works in power bi service, I have submitted it to power bi product team, I will post it here once I get a reply.
Best Regards,
Lin
Thanks Lin
I amended the measure to include the #hex colour and now the colours are displayed in the report in the PBI Service as well as the Desktop.
hi, @HMJSomerset
I get this from power bi product team:
The issue here is, the measure the user has is using "C73672", "FFFF00" and "009CA6" for the color values. Apparently chrome supports hex values like these for colors but the valid hex color format is #value. Edge does not support the values without #.
User needs to update the measure to return "#C73672", "#FFFF00" and "#009CA6".
Best Regards,
Lin
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.