Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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:
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.
Solved! Go to Solution.
@Anonymous , check for custom visual. Standard visual not supported yet.
https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals
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
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
User | Count |
---|---|
121 | |
72 | |
71 | |
57 | |
50 |
User | Count |
---|---|
167 | |
83 | |
68 | |
65 | |
55 |