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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
IZ_JE
Regular Visitor

Line and Clustered column chart - Mantain Colors even change year slicer

Hello,

 

Anybody knows how to mantain the colors of the Legend and Columns from the "Line and Clustered column chart", even if we change the "Year" in the slicer?

 

Below I show how we did the process:

 

What I need to do is having the Actual_Year, Last_Year, Year-2 per Month and when we change the slicer of the Year, the colors of the Columns should mantain.

 

First we create a second "Calendar" table (PREVIOUS_DATE) as we show below, with a not active relationship.

 

IZ_JE_1-1672921727145.png

 

Then we create the measure to show the last 3 Years:

 

IZ_JE_2-1672921800786.png

 

And then we create the chart with the following columns:

 

IZ_JE_3-1672922489709.png

IZ_JE_4-1672922505544.png

 

 

IZ_JE_0-1672921688577.png

 

But when we change to another Year, the colors change too as we see below:

IZ_JE_5-1672922631079.png

 

Do you have any solution?

 

Thank you in advance.

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@IZ_JE , Have two columns on axis, no legend, that will allow you conditional formatting. Expand and sort of axis

 

refer : Concatenate Label off : https://youtu.be/QgI0vIGIOOk

 

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

2 REPLIES 2
amitchandak
Super User
Super User

@IZ_JE , Have two columns on axis, no legend, that will allow you conditional formatting. Expand and sort of axis

 

refer : Concatenate Label off : https://youtu.be/QgI0vIGIOOk

 

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 for your reply.

It works perfectly:

 

IZ_JE_0-1673277823342.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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