cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
lazy_sapien
New Member

Make dynamic changing Header Name in table visual based on month , year slicer selection

Hi Guys,

I have been looking solution to change the header name dynamically in table visual for my 12 measures which are populating last 12 months columns (jan, feb,march..  ) sales data dynamically based on slicer month , year selection.

 

Scenario:

Chosen slicer details: Year - 2023, Month - March

 

Output in all 12 measures of table visual-

 

1st measure column- showing details of March 2022 

2nd measure column - showing details of April 2022 

3rd measure column - showing details of May 2022 

.

.

12th measure column - showing details of Feb 2023

 

Problem- But the Headers are constant and not changing as per calendar selected month and year from slicer, it has to be MMM-YYYY and should change dynamically. But above scenario, the headers should be MAR-2022,APR-2022,MAY-2022 ... till FEB-2023.

 

Looking for the positive response. 

 

 

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @lazy_sapien ,

 

You cannot have dynamic header names for a measure or column.

But you can have dynamically results returned for the same measure in a visual.

Basically the measure's result will change based on the selection of the slicer.

In your case, you could use SWITCH() function to dynamically return different results based on your slicer.

 

Best Regards,

Stephen Tao

 

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

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @lazy_sapien ,

 

You cannot have dynamic header names for a measure or column.

But you can have dynamically results returned for the same measure in a visual.

Basically the measure's result will change based on the selection of the slicer.

In your case, you could use SWITCH() function to dynamically return different results based on your slicer.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors