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
spedding
New Member

How to colour bars in a bar chart based on another measure?

Does anyone have a way to drive the colour range of bars in a bar chart based on a 2nd measure? (eg height of bars based on revenue, colour based on profit margin). This is trivial in most BI tools but I can't find a way to do it in PowerBI. Here's an example done in Tableau (1 click)

tableauchart.png

1 REPLY 1
TomMartens
Super User
Super User

Hey @spedding ,

 

you can achieve what you are looking for by applying conditional formatting to the bars, following the steps below.

I'm starting with a simple bar chart:

image.png

Now mark the chart and select data colors from the formatting pane:

image.png

Hit the fx button to open the conditional formatting dialog:

image.png

Now you can choose from different options, the next screenshot shows an example configuration. You have to be aware of the following, as your data model has dimension and fact tables you have to consider wisely which column to choose as the result may not look like as expected

image.png  

And here is the result:

image.png

 

Unfortunately, there is no legend that explains the different shades. If you need that you can check ideas.powerbi.com if an idea already exists, if not you can create your own.

 

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