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
Odn_ndO
Helper I
Helper I

Dynamic labels for cluster column chart to change based on the slicer

I've successfully created a dynamic clustered column chart where the data changes according to the selected years in my slicer, I'm facing an issue with the year labels. I want the naming of the years on the axis to also change dynamically based on the selected years in my slicer. Any guidance on how to achieve this would be greatly appreciated!

2 ACCEPTED SOLUTIONS

Hi @Odn_ndO 
If I understood you correctly you are trying to add a label for the year of each column.
This option is not available as a generic functionality.

If you want to show the years you should use hierarchies instead of the legend:

Ritaf1983_0-1703576214100.png

If you want to use different colors to code the years you can add to the date table, the code color for every year.

Ritaf1983_1-1703576318380.png

and use conditional formatting for the columns's colors.

Ritaf1983_2-1703576430767.png

Result:

Ritaf1983_3-1703576462558.png

PBIX is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Based on the above, i used the Parameter Field Function and added the years needed as per below and is able to achieve the results i am looking for.

Thank you for your advise. 

Odn_ndO_0-1703726901477.png

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Odn_ndO ,

Please have a try.

Create a column.

 

YearLabel = YEAR('Table'[date])

 

Drag the calculated column to the Axis field of your clustered column chart. This will ensure that the axis labels reflect the years present in the data after being filtered by the slicer. Make sure your slicer is correctly configured to filter the data by year. It should be connected to the same date field or a related table that allows the slicer to control the year displayed in the chart.

 

I have also found a similar post, please refer to it to see if it helps you.

Solved: Dinamically change formatting of data labels in a ... - Microsoft Fabric Community

 

How to Get Your Question Answered Quickly 

 

If I have misunderstood your meaning , please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

I managed to find a solution for this where I used the Parameter Field Function and added the years needed as per below and is able to achieve the results i am looking for.

Thank you for your advise. 

Odn_ndO_0-1703726901477.png

 

Ritaf1983
Super User
Super User

Hi @Odn_ndO 
Can you please show the desired result?

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi Rita, 

 

The desired results would be that the data label changes based on the year selected in the slicer.

Given that the slicer shows the current year,I would like to have the current year and 3 years prior. 

Odn_ndO_5-1703531333188.png

Hi @Odn_ndO 
If I understood you correctly you are trying to add a label for the year of each column.
This option is not available as a generic functionality.

If you want to show the years you should use hierarchies instead of the legend:

Ritaf1983_0-1703576214100.png

If you want to use different colors to code the years you can add to the date table, the code color for every year.

Ritaf1983_1-1703576318380.png

and use conditional formatting for the columns's colors.

Ritaf1983_2-1703576430767.png

Result:

Ritaf1983_3-1703576462558.png

PBIX is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Based on the above, i used the Parameter Field Function and added the years needed as per below and is able to achieve the results i am looking for.

Thank you for your advise. 

Odn_ndO_0-1703726901477.png

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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