Reply
Frequent Visitor
Posts: 11
Registered: ‎07-18-2018

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.

Community Support Team
Posts: 7,656
Registered: ‎05-02-2017

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.
Frequent Visitor
Posts: 11
Registered: ‎07-18-2018

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

Community Support Team
Posts: 7,656
Registered: ‎05-02-2017

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.