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

Pie chart with fixed colors despite different item selected?

Hi Experts

 

Although I can see its low feasibility, but let me try my luck here...

I have a pie chart showing the share of sales by customers, and the number of customers is big, over 100. So I selected to show only the top 5. Then here comes the problem: despite that every time only 5 are visualized, but at the background all customers have been given a unique color. So you can see with the change of slicer, different customers in different colors show up and some of these colors are very similar or not aligned with the theme color. 
So is there a solution to fix the colors in the pie regardless of which customers are selected?

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , In the video, I am sharing below, I made an attempt to give fixed color to pie, using conditional formatting(using color measure and field value option) . First I did that on the bar and then change the visual to pie. pie does not have a direct option

 

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , In the video, I am sharing below, I made an attempt to give fixed color to pie, using conditional formatting(using color measure and field value option) . First I did that on the bar and then change the visual to pie. pie does not have a direct option

 

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

 

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Just add to my previous reply, I finally worked it out: I can directly input color code like #000080 in the place of "Red", "Blue" etc...

Anonymous
Not applicable

Hi Amit, at first thanks as always.

Then your video is inspiring indeed, now I see I can change the pie to bar first and then apply the measure to control color, and I actually made it with RANKX. But here come another question: with measure you can only select some general color type like "Red", "Yellow". To get aligned with the context color, I need to call out some more special color. How can I realize it with measure? Thanks.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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