Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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?
Solved! Go to Solution.
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:
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.
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.
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:
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.
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...
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 47 | |
| 29 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 89 | |
| 74 | |
| 40 | |
| 26 | |
| 25 |