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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KatenokKatya
New Member

Conditional formatting of the Line and stacked chart

Hello,

 

I have this line and stacked chart below and I am struggling to implement conditional formatting. Each of the bars is an individual product, and each product has its own yield. How can I make bars red if it is below standard yields, but if it is above green? 

Every bar  is a different product , so I cannot use regular rules like "if yield is > 50" because each product has it own standard.  Thank you. Any help is appreciated! 

 

KatenokKatya_0-1658245656788.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @KatenokKatya,

You can create a formula to achieve expression based on conditional formatting. They can extract and interact with current row contents to calculate.

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs
You only need to check the result value and set an if statement to compare and return corresponding color codes to use on your chart.

Notice: current conditional formatting works when you did not enable the 'legends'/'column series' field on your chart or they will be auto-assigned colors by the visual itself.

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @KatenokKatya,

You can create a formula to achieve expression based on conditional formatting. They can extract and interact with current row contents to calculate.

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs
You only need to check the result value and set an if statement to compare and return corresponding color codes to use on your chart.

Notice: current conditional formatting works when you did not enable the 'legends'/'column series' field on your chart or they will be auto-assigned colors by the visual itself.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors