Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all!
is it possible to dynamically change the column name in a visual element?
I have query from SQL. A column is also added to this query using power query. Which will be named differently each month (Completed 17.02.20, Completed 17.03.20 etc)
And i have visual element Table which has this column.
How can I make the column name also change dynamically? Now if the query changes the name of a column, I get an error in the visual element, because such a column was not found.
Thank you advanced
Solved! Go to Solution.
@aignn ,
I'm afraid this could not be achieved, you need to modify the column headers manually in power query, please refer to doc below:
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @aignn ,
I can think of using a Matrix and unpivot and other tricks in Power Query to get your desired result but not using a table. In the Query Editor:
In this approach, the Attribute column will be a constant in your data model (unless renamed). What will appear in the Columns of the matrix visual is the name of the column that changes name.
@aignn ,
I'm afraid this could not be achieved, you need to modify the column headers manually in power query, please refer to doc below:
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @aignn ,
Power Bi will always give an error in the cases where the column names differ - like in your case you are writing SQL Query to extract data for this month with a COLUMN_A, next month you use same query but with COLUMN_B. You need to keep column name same in your query. I have found the following article which may help you to resolve the dynamic column name issue:
https://www.goodly.co.in/dynamic-column-names-power-query/
Let me know if that works.
Thanks,
Pragati
@aignn I guess you cannot dynamically change the column names in the visual. What you could do is to put a card visual over the column name and populate the value of the card with a measure value resulting in the wanted text.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
62 | |
62 | |
52 | |
39 | |
24 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |