Forum Discussion
vancromy
8 years agoFrequent Visitor
PQ - Rename Column Names based of column names from another table
Hi. I'm sure this is really simple but I can't seem to find the answer online. Many queries are about translating rows to Column Names but I'm specifically after how I can make the column names o...
- 8 years ago
You were pretty close already:
#"Rename Columns" = Table.RenameColumns(Table2, List.Zip( { Table.ColumnNames(Table2), Table.ColumnNames(Table1) } ) )
ImkeF
4 years agoCommunity Champion
Hi Anonymous ,
the list of column names in the rename operation must have the same lenght.
But your first table has the index column on it. So remove the index column before grabbing its column names and you should be good to go.
Anonymous
4 years agoNot applicable
Many thanks ImkeF .
This was the solution. 😃