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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Rename dynamic column header when transforming data

I am trying to incorporate data in a column into my report. However the field name is "Current Week Updates (3 Jun - 7 Jun)", with the dates component manually updated on a weekly basis in the source data file (excel web).

Trying to find a way to prevent an error with the data every week when the field name is updated. Thought of adding a step to rename the column header automatically to a standardized name so that there won't be an error when I am pulling the data in the report. Is there a way to do this?

 

Right now this is what I have:

hart_0-1717475136742.png

 

 

Of course, there is an error and I am stuck. Please provide suggestions for a solution based on your expertise.

Thanks in advance!

 



1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Syntax in is not correct for rename columns

 

https://learn.microsoft.com/en-us/powerquery-m/table-renamecolumns

example

Table.RenameColumns(
Table.FromRecords({[CustomerNum = 1, Name = "Bob", PhoneNum = "123-4567"]}),
{
{"CustomerNum", "CustomerID"},
{"PhoneNum", "Phone"}
}
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors