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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Conditional Coloring for Pie/donut Chart

Hi everyone.

 

I have a little problem, I have to create some donut chart, but the code colours should be based on the value of a field, these is the table:

ruz_lee_0-1610449519665.png

I have to create differents donut, one for each category, and the Average of rating by each category. The code colour should follow these rules:

If AVG(Rating)<5 then Red

If AVG(Rating) >=5  AND AVG(Rating)<8 Then Yellow

If AVG(Rating) >=8 Then Green

 

I think that I would need a calculated field with these rules, and add this field in the data colors of the object, but I can´t (or I don´t know) create a field calulated with AVERAGE function.

 

Any suggestion? Thanks a lot.

1 ACCEPTED SOLUTION

@Anonymous , check for custom visual. Standard visual not supported yet.

https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

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

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , As far as I know, conditional formatting is not yet supported on the pie or any other visual that use a legend.

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

And any suggestion to use like for example in the conditional formatting with the table object? As you know, a lot things is not possible to do it directly...

@Anonymous , with table visual you can create a color measure, like

Switch(True(),
AVG(Rating)<5 ,"red",
AVG(Rating)<8,"Yellow",
"Green"
)

 

Now in conditional formatting/ background color/ Data color, Under Fx option (Advance) option

Choose - Field value and use this measure.

 

Refer to these blogs for steps -

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

My video, that is for unichar and color - https://www.youtube.com/watch?v=veCtfP8IhbI

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

Yes, but the problem is that the visual figure should be a pie or donut... 😞

@Anonymous , check for custom visual. Standard visual not supported yet.

https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.