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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
knut12212
Helper I
Helper I

Why do manually assigned colors in a Power BI pie chart not remain consistent?

Why do manually assigned colors in a Power BI pie chart not remain consistent?
I manually set specific colors for each slice in a pie chart, but after refreshing the data or reopening Power BI, the colors sometimes change. What causes Power BI to reassign these colors, and how can this behavior be prevented?

1 ACCEPTED SOLUTION
MasonMA
Super User
Super User

Hi, 

 

Pie charts don’t let you directly apply conditional formatting (color by field value) to each slice the way column or bar charts do. So if you want fully locked, value-driven colors, you need to use a small workaround.

What i'd normally do is temporarily switch the visual from Pie to Column chart. This is just so we can access the conditional formatting options.

 

Create a color measure for field value 

Data Color = 
SWITCH(
    SELECTEDVALUE(Category[Category]),
    "Electronics", "Black",
    "Cosmetics", "Purple",
    "Automotive", "Orange",
    "Homegoods", "Grey",
    "Apparel", "Brown",
    "Light Coral"
)

 

Apply conditional formatting on the column chart:

MasonMA_0-1770570767927.png      MasonMA_2-1770571154026.png   MasonMA_3-1770571255513.png

 

Once the colors are applied and saved, you can switch the visual back to a Pie chart. The color assignments will persist because they’re now tied to the category values rather than the default palette order.

This usually prevents colors from shifting after refresh, new data, or publishing to the Service.

View solution in original post

3 REPLIES 3
v-karpurapud
Community Support
Community Support

Hi @knut12212 

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @krishnakanth240  and @MasonMA  for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solution?If you have any more questions, please let us know and we’ll be happy to help.

Regards,

Microsoft Fabric Community Support Team.

MasonMA
Super User
Super User

Hi, 

 

Pie charts don’t let you directly apply conditional formatting (color by field value) to each slice the way column or bar charts do. So if you want fully locked, value-driven colors, you need to use a small workaround.

What i'd normally do is temporarily switch the visual from Pie to Column chart. This is just so we can access the conditional formatting options.

 

Create a color measure for field value 

Data Color = 
SWITCH(
    SELECTEDVALUE(Category[Category]),
    "Electronics", "Black",
    "Cosmetics", "Purple",
    "Automotive", "Orange",
    "Homegoods", "Grey",
    "Apparel", "Brown",
    "Light Coral"
)

 

Apply conditional formatting on the column chart:

MasonMA_0-1770570767927.png      MasonMA_2-1770571154026.png   MasonMA_3-1770571255513.png

 

Once the colors are applied and saved, you can switch the visual back to a Pie chart. The color assignments will persist because they’re now tied to the category values rather than the default palette order.

This usually prevents colors from shifting after refresh, new data, or publishing to the Service.

krishnakanth240
Power Participant
Power Participant

Hi @knut12212 

 

Manually assigned colors in a Power BI pie chart can change after refresh as Power BI may reorder or change categories (due to new data or sorting) and colors are sometimes reassigned based on the updated category list.So,
to keep the colors consistent you can use conditional formatting with a color mapping table (Category || Color). This ties colors to category names instead of their position and remain stable after refresh.

 

Please check this article: https://radacad.com/set-power-bi-data-color-all-visuals-to-follow-same-color-for-the-same-data-point...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.