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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
joshua1990
Post Prodigy
Post Prodigy

Conditional formatting for bar chart

Hello everyone!

I have a simple bar chart with a line.

the bar shows me the actual sales per day and the line shows me the budget.

is there any chance to get a red bar if the sales were for the corresponding day below the line/ budget? 

Best Regards

3 REPLIES 3

Thanks, for your reply!

Please, read my post carefully. I am not looking for conditional formatting in a table.

I am looking for changing the color of bars in a bar chart...

 

Hey @joshua1990 ,

 

this measure returns the name of a color that should be applied to a bar if a certain condition is met:

 

fill Color = 
IF(DIVIDE([Total Sales Amount (PY)] , [Total Sales Amount]) >= 1.2 , "red" , BLANK()) 

 

This article lists the colors that are supported: https://blog.crossjoin.co.uk/2018/08/10/colour-names-supported-in-power-bi-conditional-formatting/

It's also possible to provide the hexcode of color using e.g "#ba3811".
Here is a visual:

TomMartens_0-1593270169401.png

I applied the measure to the Default color of the Data colors well of the chart:

TomMartens_1-1593270284116.png

I selected this rule

TomMartens_3-1593270355833.png

Hopefully, this is what you are looking for.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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