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
sgupta22
Helper II
Helper II

Change colour/ formatting of only one bar in a visualisation

Hi everyone

 

Is there a way to change the colour/ formatting of only one bar in a bar visualisation? I know this can be achieved in Excel charts by selecting a single bar and changing its colour. Is there a similar option in Power Bi visualisations? For instance, I want to change the color of the 2022 bar, leaving bars for the other years the same.

 

sgupta22_0-1670110837627.png

 

Thanks

SG

1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

You can write a simple measure like this to return color values based on which Year is in context, and use it as the "Field Value" for bar color.

 

BarColor = IF(MAX(T4[Year]) = 2022, "Blue", "Yellow")

 

ppm1_0-1670116396423.png

 

ppm1_1-1670116402918.png

 

Pat

 

 

Microsoft Employee

View solution in original post

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

You can write a simple measure like this to return color values based on which Year is in context, and use it as the "Field Value" for bar color.

 

BarColor = IF(MAX(T4[Year]) = 2022, "Blue", "Yellow")

 

ppm1_0-1670116396423.png

 

ppm1_1-1670116402918.png

 

Pat

 

 

Microsoft Employee

Thanks Pat.  This works! Appreciate your help 🙂

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