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
mtomova
Helper III
Helper III

Conditional colour formatting on legend in a visual

Hi all,

 

I have a clustered bar chart visual which tracks inspections for products.

To this visual I have added a legend which shows if the inspection is a 'pass' or a 'fail'.

 

How can I set the colors for the legend, so that if the inpsection is a 'pass', the bar color will be green, and for a 'fail' - red?

 

When I go to 'Format your visual' --> 'Bars', I see only 'All' in the 'Categories' drop down. I have set the colour to be green,

however, as soon as I add the legend, the colour of the visual changes to red.

 

mtomova_1-1736519866541.png

 

If I remove the legend, then I can choose any color for the bar.

 

I have tested the visual with dummy data, where I have more than one record in the table, and when this is the case I can set the bar colors when I go to 'Format your visual' --> 'Bars'.

mtomova_2-1736519981832.png

 

 

So, to me it seems that this strange behaviour is related to the fact that there is only 1 row of data in my current table I am using for this visual.

 

 

Thanks,

Maria

1 ACCEPTED SOLUTION
mtomova
Helper III
Helper III

Hi all, 

at the end none of the proposed solutions worked and I couldn't find a fix.

 

The workaround I found was to copy a colour formatted donut chart, then changed the visual type

View solution in original post

4 REPLIES 4
mtomova
Helper III
Helper III

Hi all, 

at the end none of the proposed solutions worked and I couldn't find a fix.

 

The workaround I found was to copy a colour formatted donut chart, then changed the visual type

Anonymous
Not applicable

Hi @mtomova ,

Based on the testing, try to select pass and fail separately and set the colors individually.

vjiewumsft_0-1736735541440.png

vjiewumsft_1-1736735550946.png

The result is shown below.

vjiewumsft_3-1736735775798.png

 

 

Best Regards,

Wisdom Wu

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

Greg_Deckler
Community Champion
Community Champion

@mtomova Once you add the legend, you need to go back and set your column colors again. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi, it doesn't work. I have tried that and changed different colors, but the red remains..

 

Thanks,

Maria

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