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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
monojchakrab
Resolver III
Resolver III

rename column headers of nested tabled with same column name

Hiya good people of PQ,

 

I am trying to rename a few nested tables as below :

 

monojchakrab_0-1689159252457.png

I am using the following steps :

  • first have extracted the column headers
  • then taken the same to excel and added a column for renames

monojchakrab_1-1689159621480.png

 

  • Taken the excel table back to PQ
  • Used, table.renamecolumns ,

 

Table.AddColumn(#"Removed Columns1", "TableRenames", each Table.RenameColumns([ChangedFKHeaders],Table.ToRows(Headers),MissingField.Ignore))​

but :

 

bcos a few of the tables have the same column name, I am getting the followng error :

monojchakrab_2-1689159692492.png

Is there any fix for this unless I am missing something obvious?

any help appreciated

 

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @monojchakrab ,

 

This error is because you are adding a column named "value", but this column already exists in your table. You need to check your table to see if there is already a column named "value".

                                                                                                                                                         

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.           

@v-stephen-msft - Stephen....that is what is confusing. The table returning the error does not actually contain any column with header as "Value"

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors