Forum Discussion

AsNa_92's avatar
AsNa_92
Resolver II
1 year ago
Solved

Color Rule on Area Chart

Hi Guys,

 

I want to achieve same as below graph in PBI Desktop, I'm using Area Chart to display my data but i want to apply this RED and AMBER rules color:

 

 

  • Hi AsNa_92 ,

     

    To replicate that color rule setup in an Area Chart in Power BI Desktop, you’ll need to use conditional formatting with a bit of a workaround since native area charts don’t support multi-color zones directly based on thresholds.

    Here’s a way to approach it:

    1. Create a measure that categorizes your values into ranges (e.g. Red, Amber, Blue) based on your thresholds.
    2. Use stacked area chart instead of a regular area chart. You’ll need to split your data into three separate measures—one for each color zone.
    3. Each measure should return a value only when it falls into its respective range, and BLANK() otherwise. That way, they stack visually but don’t overlap incorrectly.
    4. Assign custom colors to each series manually (Red, Amber, Blue) in the Data Colors section.

    It’s a bit of a manual setup but works well once you get the logic right.

    Let me know if you need help writing the DAX for those measures.

    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.
    translation and formatting supported by AI

5 Replies

  • Hi AsNa_92 ,

     

    To replicate that color rule setup in an Area Chart in Power BI Desktop, you’ll need to use conditional formatting with a bit of a workaround since native area charts don’t support multi-color zones directly based on thresholds.

    Here’s a way to approach it:

    1. Create a measure that categorizes your values into ranges (e.g. Red, Amber, Blue) based on your thresholds.
    2. Use stacked area chart instead of a regular area chart. You’ll need to split your data into three separate measures—one for each color zone.
    3. Each measure should return a value only when it falls into its respective range, and BLANK() otherwise. That way, they stack visually but don’t overlap incorrectly.
    4. Assign custom colors to each series manually (Red, Amber, Blue) in the Data Colors section.

    It’s a bit of a manual setup but works well once you get the logic right.

    Let me know if you need help writing the DAX for those measures.

    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.
    translation and formatting supported by AI

  • KerKol's avatar
    KerKol
    Power Participant

    You can utilize the error bands in the Analytics Pane

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi AsNa_92 ,

    We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Regards,
    Chaithra.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi AsNa_92 ,

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Regards,
    Chaithra.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi AsNa_92 ,

    We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Regards,
    Chaithra.