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
mickey2021
Frequent Visitor

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! 

 

 

7 REPLIES 7

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

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/

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.