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
spagad6263
Post Patron
Post Patron

How to assign barcolor with DAX for Clustered Barchart

Hi,

I have a barchart showing 13 months data. I would like to show the first month in different color. I can use DAX to assign the first month color for single measure. However, I couldn't find where I can use DAX when there are 2 measures. Below is the screenshot. I have a simpied version of the PBIX filel, but not sure how I couild upload to the post. Thanks

spagad6263_0-1761606725248.png

 

1 ACCEPTED SOLUTION
v-tejrama
Community Support
Community Support

Hi @spagad6263 ,

 

Thanks for sharing the details. Based on your description, it looks like you’re trying to highlight the first month in a clustered bar chart where two measures (Stage0 and Stage6) are plotted side by side. Since the color formatting option using DAX isn’t available in all versions of Power BI, you can achieve the same outcome manually without needing the fx button. You can do this by creating your chart as usual with both measures, then duplicating that chart, filtering the duplicate to show only the first month, and applying a red color to it. Place the filtered chart exactly over the original one so the first month’s bars appear in red, while the rest stay in their default colors. This simple layering trick gives you the visual highlight effect you’re after, even without dynamic formatting.

Please find the attached PBIX and Screenshort file for your reference.

vtejrama_0-1761639544316.png

 

 

Best Regards,
Tejaswi.
Community Support

View solution in original post

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @spagad6263 

When a clustered or stacked barchart includes multiple measures (or a legend split), color formatting applies per series, not per data point. That’s a technical limitation but also makes sense from a UX perspective. The human brain already needs to decode the legend and associate colors with measures; adding more conditional color rules on top would overload perception and reduce clarity.

If you still want to highlight a specific bar (like the first month), there are a few workarounds you can use:

The approach shown in this video: https://www.youtube.com/watch?v=U7kIW9Lm0rk

 

Or, a cleaner UX alternative — separate the comparison into two visuals (for example, variance and base values), align them within the same frame, and make the connection visually clear — like in my screenshot example.

Ritaf1983_0-1761640680704.png

The pbix with my example is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
v-tejrama
Community Support
Community Support

Hi @spagad6263 ,

 

Thanks for sharing the details. Based on your description, it looks like you’re trying to highlight the first month in a clustered bar chart where two measures (Stage0 and Stage6) are plotted side by side. Since the color formatting option using DAX isn’t available in all versions of Power BI, you can achieve the same outcome manually without needing the fx button. You can do this by creating your chart as usual with both measures, then duplicating that chart, filtering the duplicate to show only the first month, and applying a red color to it. Place the filtered chart exactly over the original one so the first month’s bars appear in red, while the rest stay in their default colors. This simple layering trick gives you the visual highlight effect you’re after, even without dynamic formatting.

Please find the attached PBIX and Screenshort file for your reference.

vtejrama_0-1761639544316.png

 

 

Best Regards,
Tejaswi.
Community Support

Hi @spagad6263 ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Thank you.

Ashish_Mathur
Super User
Super User

Hi,

Upload the file to a hosting service such as Google Drive/One Drive and share the download link here.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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