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
ncbshiva
Advocate V
Advocate V

Dynamic Column Name based on Slicer Selection

Hi Team,

 

I have a measure named "Sell-Out" and Year column.

My requirement is to change the column name based on the slicer selection, here the slicer is year column.

 

Example : When i select 2018 in the Year slicer, my Sell-Out column should change as "Sell-Out 2018".

Similarly when i select 2017 in the year slicer , it should dynamically change the column name as "Sell-Out 2017".

 

Can anyone help me how to write DAX to change the column name dynamically ?

 

Thanks

1 ACCEPTED SOLUTION

@ncbshiva,

 

Try adding the following calculated column and drag it to Columns of a Matrix visual.

Column =
"Sell-Out " & Table1[Year]
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
gunshruthi
Helper I
Helper I

@ncbshivahttps://community.powerbi.com/t5/user/viewprofilepage/user-id/11389, https://community.powerbi.com/t5/user/viewprofilepage/user-id/10823
Did you find any solution for changing column name only dynamically with the slicer selection? If You have can you please help me out

Stachu
Community Champion
Community Champion

there is no way to rename column dynamically based on a slicer
where do you want to display that name? you can create a measure that would return "Sell-Out 2018" based on slicer, you can then use it in card to show in dashboard



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

My requirement was to change the column name as per the slicer selection.

Stachu
Community Champion
Community Champion

that cannot be done. what do you want to acieve by changing the column name?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Just the it was requirement , i wanted to know will it be possible in Power BI or not .

@ncbshiva,

 

Try adding the following calculated column and drag it to Columns of a Matrix visual.

Column =
"Sell-Out " & Table1[Year]
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.