Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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!
Solved! Go to Solution.
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:
If you want to use different colors to code the years you can add to the date table, the code color for every year.
and use conditional formatting for the columns's colors.
Result:
PBIX is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
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.
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.
Hi @Odn_ndO
Can you please show the desired result?
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.
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:
If you want to use different colors to code the years you can add to the date table, the code color for every year.
and use conditional formatting for the columns's colors.
Result:
PBIX is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.