Forum Discussion
Colors changed in report unexpectedly
- 1 year ago
vipett Yes, I have faced this issue, the colors were jumbled between the report in desktop view and the report in service. I tried setting it manually couple of times but it didn't help. Instead of setting the colors manually in the bar chart I resorted to using Conditional Formatting using a measure.
The measure forces the visuals to use the assigned colors and It is also easy to change the colors of the categories in future without having to revisit all the visuals.
Create a measure like below and add it your fx option under your visuals
Color Format = SWITCH(Products[Category], "Mobile", "#89010A", "Laptop", "#ffffff", "#55f443")Thanks,
Jai
- 1 year ago
Hi vipett
This issue with colors "jumping" or appearing inconsistently is a known limitation in Power BI.
If you're not using a legend to assign colors (based on a dimension like company), Power BI doesn’t lock the color positions reliably – especially in stacked charts.If you're coloring by a measure or category directly on the bar, one workaround is to use conditional formatting to explicitly set the colors.
Unfortunately, if the color logic is driven only by the stacked segments without a legend, there's no native way to ensure stable color assignment.If you're able to share a simplified version of your PBIX file and a description of the desired outcome, I’d be happy to think of an alternative visual solution.
In many cases, stacked bar charts are not ideal for reading exact values or comparing across groups – especially when showing absolute values. They can even be misleading depending on how the data is laid out.If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi vipett ,
Since we haven't heard back from you after our last reply, we wanted to follow up and check if the manual color approach was helpful and sustainable for your scenario. Also, if you found any of the replies in this thread useful, please consider marking them as Accepted Solution, as this helps others with similar queries find the answers more quickly.
Thank you.