Forum Discussion

gcam032's avatar
gcam032
Helper I
5 years ago

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:

 

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:

 

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

  • 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

    • gcam032's avatar
      gcam032
      Helper I

      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.

      • martaTr's avatar
        martaTr
        Frequent Visitor

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

    • Anonymous's avatar
      Anonymous
      Not applicable

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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?