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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
siddhantk989
Helper III
Helper III

How to create a dynamic measure name in Power BI?

Hi,

 

   I am  trying to create a measure name with current year in it. For example the measure name for 2017 should be 2017 Sales and then it should automatically change to 2018 Sales in 2018. Is there any way to achieve this in Power BI?

 

Thanks,

Siddhant

1 ACCEPTED SOLUTION
bjoshi
Resolver I
Resolver I

Hi @siddhantk989,

 

Like @dkay84_PowerBI said, it might not be possible to dynamically change the measure name. How about keeping the measure name same, but changing the measure value dynamically based on the year.

For eg:

Title = Year(Now()) & " Sales"

If you are using this for a chart title then it would be "2017 Sales" in the year 2017 and "2018 Sales" in the year 2018.

 

View solution in original post

4 REPLIES 4
bjoshi
Resolver I
Resolver I

Hi @siddhantk989,

 

Like @dkay84_PowerBI said, it might not be possible to dynamically change the measure name. How about keeping the measure name same, but changing the measure value dynamically based on the year.

For eg:

Title = Year(Now()) & " Sales"

If you are using this for a chart title then it would be "2017 Sales" in the year 2017 and "2018 Sales" in the year 2018.

 

Thanks @bjoshi and @dkay84_PowerBI for the help. I think the way bjoshi suggested is the beast way of doing this

dkay84_PowerBI
Microsoft Employee
Microsoft Employee

You can create a text measure that will dynamically change based on slicer selection, and then put that measure as a card above your chart/visual.  As far as I know, you cannot have a dynamic measure name, only the output.

 

See the following:

https://blog.crossjoin.co.uk/2016/04/25/dynamic-chart-titles-in-power-bi/

@dkay84_PowerBI the above link is broken; Do you still have the updated link to the blog you mentioned?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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