Forum Discussion
expression error "field-name" already exists while renaming column headers
Hey good people,
I am getting a strange error as captioned above, in the query which was working fine till some time ago.
Here is a table, with a column of tables, in which I am trying to insert a column of the same tables, but with renamed headers :
Table.AddColumn(SourceTables, "Custom", each Table.RenameColumns([Data],RenameHeaders,MissingField.Ignore))The RenameHeaders is a list of list
The table is as below :
and the field structure in one the tables for illustration is as below :
Strangely enough I am getting the following error :
Am i getting something wrong : most surprisingly the same exact code in another query is not returning any error
ANy help appreciated
regds.,
- Anonymous3 years ago
Hi monojchakrab ,
Maybe the blog and the similar post could help you.
Efficiently rename columns with a function in Power BI and Power Query (thebiccountant.com)
Solved: Dynamically rename columns from a column names tab... - Microsoft Power BI Community
It works fine on my sample.
= Table.AddColumn(#"Added Custom", "Custom.1", each Table.RenameColumns( [Data], {"Name", "NewColumn"}, MissingField.Ignore ))You can download my attachment for details.
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.
1 Reply
- AnonymousNot applicable
Hi monojchakrab ,
Maybe the blog and the similar post could help you.
Efficiently rename columns with a function in Power BI and Power Query (thebiccountant.com)
Solved: Dynamically rename columns from a column names tab... - Microsoft Power BI Community
It works fine on my sample.
= Table.AddColumn(#"Added Custom", "Custom.1", each Table.RenameColumns( [Data], {"Name", "NewColumn"}, MissingField.Ignore ))You can download my attachment for details.
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.