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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rjm
New Member

A collection of PowerBi Pie charts and their colouring consistency

Hello,

 

I have a PowerBI report that needs to contain quite a few pie charts, which are reporting on the output of a 'likert' grid from Microsoft Forms, whereby a respondent provides an answer from a consisent set of multiple choice answers across a number of questions (gauge of opinion etc.).

 

I would like the colour of each segment of the pie charts to consistently represent a given common answer (e.g. agree, disagree, strongly disagree etc.).  Not only does PowerBI not seem to have the intelligence to auto-assign the same colour scheme as it did on the previous pie chart, the Format Painter does not seem to apply to these settings when tried.

 

Other than manually going through each and every pie chart setting the colour scheme, what approach would you take to this?

 

Richard 

2 REPLIES 2
amitchandak
Super User
Super User

TomMartens
Super User
Super User

 Hey @rjm ,

 

unfortunately it's not possible to assign a color to categorical values.

This means, you have to adjust each pie chart.

 

If you do not have to use pie charts, as pie charts are not supporting conditional formatting

 

For this reason I create a measure that returns either the name of a color or a valid hexcode. Here is an example of for a DAX statement:

fill color product color =
var productcolorname = MAX('DimProduct'[ColorName])
return
SWITCH(
     productcolorname
     , "blue" , "red"
     , "Gold" , "red"
     , "grey"
    )

Then I assign this measure to the default colors of the bar chart:

TomMartens_0-1593372577165.png

and choose this rule

TomMartens_1-1593372639631.png

and the chart will look like this:

TomMartens_3-1593372706421.png

 

Hopefully, this is what you are looking for.

 

Regards,

Tom

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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