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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Assign data colors to specific category/series

Hi all - we are trying to assign specific colors to specific series on the pie chart , as data is being entered into the underlying excel/data source is being updated. For example, if initially the pie chart or visual is blank and a user enters a value ($ amount) under the category of sales ("Retail" for example), then the value should be populated in the pie chart as the color hex code red. 

I know that the JSON data colors are available, but they are assigned in random order when data values (measures) are plotted on the chart i noticed , like red could be assigned to "Healthcare" sales if the user enters data in there first. 

However, we have defined rules and organizational color theme that maps red (#FF0000) to "Retail". How do i ensure that the JSON file colors are applied to the appropriate categories ? (e.g. if user enters value for EMR, it should have been assigned to color blue instead of the red one you can see in the screenshot. LS should have been assigned to the green color instead of yellow etc.)

 

2019-10-17_21-32-08.png

 

 

Thanks all!

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous ,

AFAIK, current 'conditional formatting' feature only works on table and matrix visuals.
If you do not use any field on legend, you can try to use advanced color formatting feature, it also allows you to do color formatting on 'Data colors' panel, it is similar to conditional formatting.

BTW, color formatting seems not works on Pie chart, you can create other type of visuals(stacked column/bar chart) and apply color formating, then switch visual type to Pie chart. (Power bi will keep enabled previous visual 'data colors' settings)
Regards,

Xiaoxin Sheng

Anonymous
Not applicable

But even conditional formatting i can only use once i actually have data in the underlying dataset correct? I am trying to set colors to categories even before there are any data in the dataset. 

I guess this is not currently possible then in Power BI.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.