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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ssrinath
Advocate I
Advocate I

Conditional Formatting on Stacked Column Chart

Hello!

 

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

ssrinath_0-1757694272160.png

 

 

 

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.

 

ssrinath_1-1757694390984.png

 

ssrinath_2-1757694433994.png

 

Thank You!

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

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-f...

 

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.


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

5 REPLIES 5
OwenAuger
Super User
Super User

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-f...

 

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.


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Thank you for this - I will test this out!

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  

Ritaf1983
Super User
Super User

Hi @ssrinath 

Please relate to my solution include full explanation and alternative by the link:
https://community.fabric.microsoft.com/t5/Desktop/changing-color-of-stacked-column-chart/m-p/4812114...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors