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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Powereports
Helper I
Helper I

Changing measure name dynamically based on year selected in Slicer

Hi All,

 I am looking for a way to change dax measure name dynamically based on the year selected on the slicer. I know we can change titles dynamically, but not sure if this can be achieved for Dax measure name.

e.g. In the screenshot below what i have now is Billed Revenue_SelectedYear and Billed Revenue_LastYear, but instead i would need Billed Revenue_2021 , Billed Revenue_2020 based on the slicer selected as in the screenshot below.

Currently below is the formula i am using for the calculation:

Billed Revenue_SelectedYear  = CALCULATE(SUM(FACT_Monthly_Sales_By_business_Line[Amount Billed]), DATESMTD ( 'Calendar'[Date]))
 All i want to do is change the measure name based on my slicer selection
dynamic dax name.JPG
2 REPLIES 2
lbendlin
Super User
Super User

As far as I know you cannot do that. What you can do is add all of your measures to the visual but calculate the ones you want to hide as BLANK().  Then they won't show in the visual.

 

Or use Calculation Groups, I guess?

Thanks for letting me know Iblendin. 

I was just trying to see if there is a direct way , but i guess there is not one such method.

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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