Forum Discussion
Dynamically Change Column Title
As far as I know, it is not possible to dynamically change a column's title.
I can, however, think of a way you can create an illusion as if that's whats happening, at least in some scenarios-
1. Add to your data table or date master table a new column, whose values would be in the form if 'Year <YearNumber>', where <YearNumber> is, obviously, the year part of the date column in the current row.
For example, add a calcuated column called 'RelevantYear' to your date master table with the following DAX expression-
RelevantYear = "Year " & YEAR([Date])
2. Add a matrix visual to your report, put all the categorical data you want to display in its 'Rows' field bucket, put the 'RelevantYear' column in its 'Columns' field bucket, and put the 'CurrentYear' column in its 'Values' field bucket.
This will result in 'Year <YearNumber>' columns in the matrix for each year in your data table, showing the data relevant for that year. When you select a date in your slicer, only the relevant 'Year <YearNumber>' for the selected date will be displayed.
3. Replace your slicer with a 'Chiclet Slicer' visual, which can be obtained from the custom visuals store, because it allows you to force a selection, basically making it function like a set of radio buttons, thus making only one 'Year <YearNumber>' column visible at any single moment. So add that chiclet slicer to your report, put the dates column in its category bucket, go to the 'General' tab in its 'Format' panel, set 'Multiple selection; to 'Off' and 'Forced selection' to 'On'.
Hope this helps!