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
admin11
Memorable Member
Memorable Member

How to make different year different color

Hi All

I have a bar chart with YrMth , i like to make every year different colour , may i know how to do it ?

admin11_0-1616480163539.png

Below is my PBI file :-

https://www.dropbox.com/s/viufpu6mii49nf5/PBT_V2021_392%20TI_SI_GL%20SAMPLE%20-%20diff%20yr%20diff%2...

 

Paul

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@admin11 , Try a color measure like

 

Switch(max('Date'[year]),
2019, "green",
2020, "blue",
2021, "red",
"grey"
)

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@admin11 , in coditional formatting, Data color , advance option, "Field value" nad use measure 

 

refer my video for this https://youtu.be/RqBb5eBf_I4

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you very much , it work fine now

amitchandak
Super User
Super User

@admin11 , Try a color measure like

 

Switch(max('Date'[year]),
2019, "green",
2020, "blue",
2021, "red",
"grey"
)

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

Where should i insert the measure to ?

admin11_0-1616480795059.png

 

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!

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