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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ngut47
Frequent Visitor

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 IV
Resolver IV

Hi @ngut47 
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/ba...

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 IV
Resolver IV

Hi @ngut47 
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/ba...

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!


Would something like this work, a post from anonymous?

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

Hi, @ngut47 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.