Forum Discussion

TG242891Reading's avatar
TG242891Reading
Icon for Advocate I rankAdvocate I
1 year ago
Solved

Donut chart using conditional formatting for value ranges from a single column

Hi!   I am making a donut chart to go alongside a risk matrix. The risk matrix is colour coded based off the combined score from the 'Inherent Impact' and 'Inherent Liklihood' of the risk. I wanted...
  • burakkaragoz's avatar
    1 year ago

    Hi TG242891Reading ,

     

    Yeah, this is frustrating but I'll give you the real deal. Power BI donut charts don't have conditional formatting built-in like other visuals do.

    Here's what you actually need to do:

    Step 1: Create risk categories first Make a calculated column to group your scores:

    Risk Level = 
    IF([Total Risk] <= 6, "Low Risk",
    IF([Total Risk] <= 15, "Medium Risk", 
    IF([Total Risk] <= 25, "High Risk", "Critical Risk")))

    Step 2: Use the workaround

    • Create a bar chart first
    • Legend: Risk Level
    • Values: Count of risks (or just count of rows)
    • Apply conditional formatting to the bars (this works on bar charts)
    • Set your colors: Low=Green, Medium=Yellow, High=Orange, Critical=Red
    • Then switch the visual type back to donut chart

    Step 3: Manual color override Once you switch to donut, the conditional formatting disappears, but the colors stick. You can then manually adjust individual slice colors in the format pane if needed.

    Alternative: Just create the donut chart normally with Risk Level categories and manually set each slice color in the format pane. Less fancy but gets the job done.

    The conditional formatting trick only works by going through bar chart first - it's a known limitation that Microsoft hasn't fixed.


    If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

    This response was assisted by AI for translation and formatting purposes.