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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Set color scale with conditional formatting by Year (In legend)

I have a clustered bar chart, with a count measure in field values, category in axis and year in legend. 

 

Can I set colors by color scale with conditional formatting on my legend? 

ngut47_3-1638624418136.png

 

I want this

The colors were manually set, but what if i had more years i my legend. I would have to change one by one. 

ngut47_5-1638624567875.png

 

Is there a way to do this with conditional formatting instead of chosing color for each year? 

 

Maybe with measure or something?

 

Thank you in advance

1 ACCEPTED SOLUTION
jeroendekk
Resolver V
Resolver V

Hi @Anonymous 
Unfortunately once you use the legend on a bar or column chart. The conditional formatting options disappeard. Even when you add the formatting first.

There are several ideas about this on the ideas website to change this.
Microsoft Idea  · Conditional formatting of data color on legend with Stacked or clustered column/bar Chart (powerbi.com)

I do not know of a "trick" to achieve this. It seems to be an option currently not offered. Although I think it should be.

Best regards,
Jeroen

If you liked my awnser, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!


View solution in original post

3 REPLIES 3
jeroendekk
Resolver V
Resolver V

Hi @Anonymous 
Unfortunately once you use the legend on a bar or column chart. The conditional formatting options disappeard. Even when you add the formatting first.

There are several ideas about this on the ideas website to change this.
Microsoft Idea  · Conditional formatting of data color on legend with Stacked or clustered column/bar Chart (powerbi.com)

I do not know of a "trick" to achieve this. It seems to be an option currently not offered. Although I think it should be.

Best regards,
Jeroen

If you liked my awnser, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!


Anonymous
Not applicable

Would something like this work, a post from anonymous?

https://ideas.powerbi.com/ideas/idea/?ideaid=b03d0ec4-062c-ec11-b76a-281878de77da

Hi, @Anonymous 

The idea  mentioned in the post has not been implemented. Currently, conditional format is not applicable to the color setting on the legend field. You can only manually set the data color.

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.