Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi everyone,
Is there a way to set the colors of my visualizations in a definitive way in a report? Because it seems to me that they change everytime I make a change to the data source or to the queries I do. I'm not able to explain this behaviour further because I don't know how this works and I haven't really kept track of color changes to identify when it happens, but I'm quite sure it happens if I make even a slight change in my data source (the view in SQL for example). This is a problem because everytime I have to manually re-set all the colors and I sometimes don't even remember what colors I put if it's a report I did weeks earlier (but the user has already used it for some weekes so I can't just change colors randomly)
I know I'm not giving that great an explanation but if you're familiar with this behaviour and can point me to some documentation to explain how this works and how I can fix it it would be really helpful
Solved! Go to Solution.
Hi @HxH
The pie chart changes color based on the legend values.
If you legend values change, the color would change accordingly.
You can try to format the color in custom theme and import it into Power BI Desktop file.
https://dataveld.com/2018/01/20/template-theme-files-for-power-bi-visuals/
https://www.mssqltips.com/sqlservertip/5444/power-bi-layouts-and-themes/
https://docs.microsoft.com/en-us/power-bi/desktop-report-themes
Hi @HxH
Where is the color in your problem?
Is it the color of the values in matrix or table where conditional formatting is set?
Could you show me some screenshots so i can understand you problem better?
Best Regards
Maggie
Ok I have a specific example, it happened right now. I went to Power Query and replaced "male" with "Male" in a column (changed the first letter in uppercase) and the color in the pie I was using changed randomly. By changing the value it loses the color settings you put in the first place, which makes sense because it is a totally different value for Power BI (even though I only changed one letter to uppercase). I was wondering if there is a way to better manage this kind of behaviour
Hi @HxH
The pie chart changes color based on the legend values.
If you legend values change, the color would change accordingly.
You can try to format the color in custom theme and import it into Power BI Desktop file.
https://dataveld.com/2018/01/20/template-theme-files-for-power-bi-visuals/
https://www.mssqltips.com/sqlservertip/5444/power-bi-layouts-and-themes/
https://docs.microsoft.com/en-us/power-bi/desktop-report-themes
I'm talking about the data colors that I set in visualizations like pies and historgrams. They go back to default (or they are selected randomly) when some changes are made, like changes in the SQL view used as a data source, even though the column I am using in the visualization is not directly affected from the change in the source. I'm sorry I can't be more precise but as I've said I haven't kept track of when it happens (and I don't have the possibility to make tests right now). If there is some documentation on the behaviour of data colors in PBI reports that could maybe give me some info on this topic I'll look for the solution myself