cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lewisgravity Frequent Visitor
Frequent Visitor

Fix colour of pie chart - base on field or keep them constant

Hi,

 

Is there any way I set the data colour based on the field? If not, is there any way to keep them constant?

 

I'm building reports based on different datasets. Sometimes, I have to switch datasets from one to another. The problem of mine is the colour setting might change (only at pie charts). At different datasets, the legend varies. I guess that's the main challenge of switching datasets. Unlike a bar chart or treemap, I can set the colour to be based on fields, and the problem can be solved. But I'm still struggling in any solution on a pie chart. 

 

Many Thanks.

3 REPLIES 3
v-jiascu-msft Super Contributor
Super Contributor

Re: Fix colour of pie chart - base on field or keep them constant

Hi @lewisgravity,

 

Which version did you use? It seems good in my test. Please refer to the snapshot below. Surely, my test is quite simple.

Fix-colour-of-pie-chart-base-on-field-or-keep-them-constant

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lewisgravity Frequent Visitor
Frequent Visitor

Re: Fix colour of pie chart - base on field or keep them constant

@v-jiascu-msft

 

Hi Dale,

 

Thanks for getting back to me.

 

I'm currently using NOV 2018 version. However, this is a long-term problem of mine. I used to manually set colours for pie charts after switching data source.

 

Let me clarify my problem:

 

-------------------------------------------------------------------------------------

 

I got the same data structure with the different data source (server and database) and I had pie charts built based on tables. Here is an example of tables.

 

table1 - Data Source 1  
itemvaluecategory
a10A1
b20A2
c30A3

 

table1 - Data Source 2  
itemvaluecategory
d20B1
e10B2
f50B3

 

table1 - Data Source 3  
itemvaluecategory
g15C1
h60C2
i20A1

 

 

If I switch from data source 1 to data source 2, it should work since the category is all different. But if I switch from the data source 3 to data source 1 after switching the data source 2 to data source 3, the colour of A1 might change. (sometimes it can keep the colour setting but sometimes it cannot)

 

-------------------------------------------------------------------------------------

 

I'm glad that the colour function supports more charts so I have updated all my treemaps and bar charts with the new conditional colouring function. 

 

https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-november-2018-feature-summary/#conditional...

 

 

What I'm looking for is a similar way to control the colour of pie charts. I can understand that it is not a part of the upgrade but is it on the roadmap? Or is there any other way I can achieve a similar result? 

 

Best Regards,

Lewis

v-jiascu-msft Super Contributor
Super Contributor

Re: Fix colour of pie chart - base on field or keep them constant

Hi Lewis,

 

The conditional formatting could solve your issue. I would suggest you vote up this idea.

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 1,540 guests
Please welcome our newest community members: