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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Change the color of the chart based on the objective

Hello,
I created a chart of grouped columns and lines that shows production quantity values ​​for each different machine. I also created a measure that is being used as an objective for each machine (the black line). My chart looks like this:
charttt.PNG

 

Both, the value of the chart and the objective line, is correct, but how can I set to change the color of the bar whether the machine's objective has been achieved or not?
Example: for machine 315, the bar should be green, but for machine 110, the bar should be red. How do I do that?

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hello @Anonymous 

You can create an additional measure calculating the difference (or the sign of the difference) between [Qtd.] and [Objective] and use that as the basis for conditional formatting of the bars.

 

Attached is an example, where I created a measure:

Surplus = 
[Qtd.] - [Objective]

Then I set conditional formatting for Default Color (which is the bar color) as follows:

OwenAuger_1-1618013421274.png

Result looks like this:

OwenAuger_2-1618013493483.png

Regards,

Owen

 


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

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hello @Anonymous 

You can create an additional measure calculating the difference (or the sign of the difference) between [Qtd.] and [Objective] and use that as the basis for conditional formatting of the bars.

 

Attached is an example, where I created a measure:

Surplus = 
[Qtd.] - [Objective]

Then I set conditional formatting for Default Color (which is the bar color) as follows:

OwenAuger_1-1618013421274.png

Result looks like this:

OwenAuger_2-1618013493483.png

Regards,

Owen

 


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

This is amazing! Thanks!

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
Top Kudoed Authors