Forum Discussion

ssrinath's avatar
ssrinath
Advocate I
11 months ago
Solved

Conditional Formatting on Stacked Column Chart

Hello!

 

I have a stacked column chart with two measures in Y-Axis, similar to this.

 

 

 

I was wondering if there was any way to configure conditional formatting for the column colors? 

 

I see the option when I have only a single measure in the Y-Axis.

 

 

 

Thank You!

5 Replies

    • ssrinath's avatar
      ssrinath
      Advocate I

      Hi Rita, 

       

      I like the small multiple idea! Just to expand on this, I have a requirement to display actuals based on the periods that have been completed in the calendar year, and the forecast amount for the remaining year. 

       

      I would likely have two measures on the Y-Axis, and I wanted to see if there was any quick formatting options I could take advantage off. 

       

      Thank You!

  • Hi ssrinath 

    The Power BI interface doesn't allow conditional formatting to be set when multiple measures are added to a stacked column chart. However, if you're willing to use this "hack", you could define conditional formatting for each measure by editing the appropriate visual.json file with the PBIP format:

    https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/PBIP-fx-hack-dynamic-expressions-for-properties-everywhere/ba-p/4592751

     

    I just tested myself with conditional formatting defined based on a measure and it worked.

    Rule/Gradient-based formatting may also be possible but I haven't tested.

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

      Hi  ssrinath  ,

      I would also take a moment to thank OwenAuger  and Ritaf1983 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
      I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.

      Best Regards, 
      Community Support Team