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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
BBConsultancy
Helper I
Helper I

Conditional formatting on stacked column chart

Hi All,

 

I want to create a 100% stacked bar chart that shows the progress per employee on target. I want the 'achieved' part of the bar to be colored, and the 'to-go' part in light gray.

 

However, the colored part of the bar should change based on the selected company. The issue is that the conditional formatting option for bar colors dissappears when you add multiple measures (or a bar legend) to the visual.

 

It's a nice to have and not a must for this case, but i'm still curious if anyone found a workaround for this.

5 REPLIES 5
v-sgandrathi
Community Support
Community Support

Hi @BBConsultancy,

 

Just wanted to follow up and confirm that everything has been going well on this. Please let me know if there’s anything from our end.
Please feel free to reach out Microsoft fabric community forum.

 

Thank you.

Shahid12523
Community Champion
Community Champion

- Unpivot your data so you have a single measure (Value) and a category column (Status: "Achieved", "To Go").
- Use legend-based coloring: set "To Go" to light gray manually.
- For "Achieved", use a DAX measure to dynamically assign color based on selected company.
- Conditional formatting only works with fields, not multiple measures—so avoid using separate Achieved and To Go measures.

Shahed Shaikh

Hi, thanks for your reply. When you use just one measure and put status in the legend, you still don't have the option to apply conditional formatting. 

Hi @BBConsultancy,

You’re right, adding a legend to a stacked column or bar chart disables the conditional formatting (fx) option for data colors. This is a known limitation in Power BI visuals.
As a workaround, you can use a dynamic color measure or a field parameter to control colors based on the selected company.
Alternatively, custom visuals like Deneb or Charticulator allow color assignment through measures or expressions. If you want to use only native visuals, you can create a lookup table that maps each company to a specific color and reference it in your measure to dynamically set the Achieved color, while keeping To Go in light gray. This helps maintain visual consistency even without native conditional formatting when a legend is present.

Thank you and continue using Microsoft Fabric Community Forum.

Hi @BBConsultancy 

The Power BI Desktop interface won't allow conditional formatting on any core stacked bar/column visuals when multiple measures or a legend field are included (as you've observed).

 

There is a "hack" which I've used in the past described in this post that involves editing the visual.json file within the PBIP format. I have tested this myself previously and it appears to work as expected, but it's not "officially" supported.


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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.