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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
gcam032
Helper I
Helper I

Maintain Colors after data refresh

Hi Everyone,

 

I have a report that I'm using as a template.  Meaning, the main PBI structure remains the same, I just fill it with data from a different customer (for each customer).

 

I'm using a Theme that has the colors included in an order (e.g. Color 1 = x, Color 2 = y and so on...).  

 

In PBI desktop, when I change the parameter to a different customer name (thus, pulling data for a different customer), all of the colours change.  For many of the categorical variables, the category values change depending on what customer is in the template.  As a result, I can't even force colors in each visualisation, because they appear to be tied to a value rather than an order.

 

Help!  It's so frustrating!

 

*UPDATE* - adding some more information here in hope of getting a response.

Here is the chart:

gcam032_0-1634253323967.png

 

You can see that each line represents a month in the last 3 months.  If I refresh this next month, I want to maintain the three colours for the three lines.  But what happens, is that the colours change every time I refresh with a new month.  I can only dictate the colours on the specific legend value:

gcam032_1-1634253420350.png

 

This doesn't help because these values will always change over time.  I want to basically tell this chart to always use the same 3 colours and never change.

 

 

 

Thanks,

GPC

5 REPLIES 5
RaeRae
New Member

I am having the same issue with my map- I have a legend with 3 colors published to the Bi Service, evry refresh it changes the pre defined colors on the legend and map. This is extremly confusing for the comsumers of this report. I have tried everything. Does anyone have suggestions how to fix it?

RaeRae_0-1742839848671.png

RaeRae_1-1742839901061.png

RaeRae_2-1742839996352.png

 

 

amitchandak
Super User
Super User

@gcam032 , You can try to use conditional formatting, You will be able force that line and pie too

 

Switch( True(),

max(Customer[Name]) =  "Abc" , "Green,"

max(Customer[Name]) =  "Def" , "Gray,"

// Add other

"blue"

)

 

refer my video on the same

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I have the same issue with my map legend - every refresh it switches the pre defined map color categories around- anyone find a solution?

@amitchandak 

Thanks.  The solution I need is slightly different.  Using your video as an example, you have Brand 1-13.  Let's say you refresh and now you have Brand 20-33 (i.e. the brands are different names than before).  I need PBI to always use the correct colour order as defined by the theme - but what happens, is that it gives the new brands colours that are not defined in the theme or at least it doesn't start at the first colour.

 

Any ideas?  I can't define a brand (or other field) by name as they change depending on the data coming into the template.

hi , did you find a solution? i have the same problem

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.