Forum Discussion
Auto-renaming columns based on value in another table
- 9 years ago
Hi david2,
After looking into the pbix file and JSON files you shared with me, I found several issues you may need to pay attention to.
1. Use formula below in your Advanced Editor.
#"Renamed Columns" = Table.RenameColumns(#"Expanded Column1",Table.ToRows(fields)) in #"Renamed Columns"Not
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",Table.ToRows(fields)) in #"Renamed Columns"2. As a table cannot have two columns with the same column name, please make sure all values of "name" column in "fields" table are unique and not already exist in "deals" table.
Here are the modified pbix file and JSON files for your reference.
Regards
Hi v-ljerr-msft ,
I have the same problem as stated above, however, I dont have all the columns name exists in "deals". Is there a way to select what is exists, and ignore those unavailable columns to be rename?
Thanks!
Yes; you can Ignore the Missing fields
= Table.RenameColumns(#"Removed Columns", Table.ToRows(fileds), MissingField.Ignore)