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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
mickey2021
Advocate I
Advocate I

Change column header names dynamically in a table visual

Hello everyone, 

I am trying to find a way to dynamically update the column header names in a tabular table visual as soon as possible. Currently, I have a table called Product and it has a lot of columns where some of their column names need to get dynamically updated every month/quarter. I was able to write some M codes in the query editor to dynamically change column header names there and apply the changes, but I failed to find a way to do the same outside of query editor in the table visual. 

 

Below is an example of the original table: 

Product Category Country Non Shipped Quantity Q1 2021Non Shipped Quantity Q2 2021BackOrderQuantity October 2021

BackorderQuantity

November 2021

HeadsetUSA121234
ComputerUK3421

 

Below is the output of what I am looking for. The last four column headers' name inside the table visual should automatically gets dynamically changed when they gets updated inside the query editor. 

Product Category Country Non Shipped Quantity Q3 2021Non Shipped Quantity Q4 2021BackOrderQuantity November 2021

BackorderQuantity

December 2021

HeadsetUSA121234
ComputerUK3421

 

Based on my research, I learned that there is currently no such feature to dynamically change the column header names inside the table visual (please correct me if my understanding is wrong). I also looked into options of using matrix by unpivoting the columns first inside query editor and pivoting them inside matrix in the table. However, in my scenario, I don't think matrix is a doable option for me because matrix can only do one column's pivoting at the same time but I have multiple columns that I need to pivot. 

 

I also looked into possibility of using Dax or other approaches to handle it but haven't really found a way to handle my situation above. 

 

May I get some help here to see how I can approach this to dynamically update the column header names, please? 

 

Thank you! 

 

 

8 REPLIES 8
ajinkyacgaikwad
Advocate I
Advocate I

Please watch this video I made for 
Dynamic Column Names in Table Visual : https://youtu.be/nAypPLYbeb4?si=3d_u_uRcPZBtbeB6

David_Morris
Frequent Visitor

Although this is an old post, I found myself here because I want to do something similar. I decided to do it manually by adding a "shape" visual, setting its text to a measure variable I created, setting the effects to have no background and no border, and placed over the top of the column heading that is already there.

 

A draw back is that the user cannot then click on the column heading to change sort order, but in my case that was not needed, so overlapping another visual over top of the column heading seemed to do the trick visually.

Please watch this video 
Dyanmic column names in table visual : https://youtu.be/nAypPLYbeb4?si=3d_u_uRcPZBtbeB6

V-pazhen-msft
Community Support
Community Support

@mickey2021 

You cannot have dynamic names for a measure or column. But you can have dynamically measures to be displayed in a table visuals. Basically the field will change based on the measure you selected in a slicer. 

 

This article used a chart but it is the same with table or matrix.

Dynamic Measure Selection in Power BI - Visual BI Solutions

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Hi Please watch following video.
Dynamic Column names in table visual : https://youtu.be/nAypPLYbeb4?si=3d_u_uRcPZBtbeB6

This is not a good solution but great way of driving a few views to your link. Your solution hinges on the dates being the columns and not field to create rows. Proper fact tables should not use this table format 

amitchandak
Super User
Super User

@mickey2021 , I think the research is correct. There is not dynamic names for measures. As of now only you can have a dynamic table/visual title.

You can vote for an idea or log a new one. https://ideas.powerbi.com/ideas/

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.