Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
HxH
Advocate II
Advocate II

Setting colors in a definitive way in my report

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 

1 ACCEPTED 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

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

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

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.