cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sviswan2 Regular Visitor
Regular Visitor

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
Community Support Team
Community Support Team

Re: Assign data colors to specific category/series

HI @sviswan2 ,

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

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
sviswan2 Regular Visitor
Regular Visitor

Re: Assign data colors to specific category/series

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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors