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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Philsmind
New Member

Dynamic legend chart based on selected year

Hi,

I have a question about the legend of a chart. X-axis is a month column. Y-axis are 2 measures. 1 measure calculates a result for the selection of year 1, the other one for the year selected in the filter Year 2. But I would like to have the legend saying in this example 2021 instead of year 1, and 2022 instead of year 2. So it would have to show the selected year as name in the legend. Would this be possible?

Thanks in advance for helping me out.

Philsmind_0-1673372351658.pngPhilsmind_1-1673372478093.png

 

2 REPLIES 2
mahenkj2
Solution Sage
Solution Sage

Hi @Philsmind ,

 

If I am understanding your need correctly, just rename the Y axis in the bar chart:

 

mahenkj2_0-1673374259359.png

Hope it helps.

Hi @mahenkj2 ,

Thank you for your answer. The name has to be dynamic. So if for example when I would change the filter of Year 1 to 2016, the name in the legend should also change in 2016 instead of 'Year 1'.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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