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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

2 REPLIES 2
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

@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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.