Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Dynamic Column Name change Based on Slicer Selection

I have a measure named current year(2021-2022) and Prev Year (2020-2021).

 

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

 

Example : When i select 2020-2021 and 2021-2022 in the display Year slicer, my current year column should change as "2021-2022" and prev year column should be "2020-2021"

 

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

 

output is as below

 

display year is slicer selection

 

3 Replies