Forum Discussion
Simple Way to Handle Column Renames in Power BI?
- 1 year ago
Hey,
I think it should be enough if you add a step in power query to rename the columns using the mapping table, you should try to add this step
= Table.RenameColumns(PreviousStep, List.Zip({MappingTable[OldColumnName], MappingTable[NewColumnName]}), MissingField.Ignore)I created an example PBIX file for you (attacched). Feel free to check it out.
Hi Nazdac2024 ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you Shahid12523 danextian Royel Gabry for the prompt response.
Maintain a mapping table with Old Column - New Column. Update it whenever backend renames columns.
Use Power Query to rename columns dynamically: convert the mapping table to a list of {Old, New} pairs and apply Table.RenameColumns with MissingField.Ignore.
Load the renamed table into Power BI - visuals and semantic model will now show the new column names.
Update DAX measures referencing old columns, or use Tabular Editor for bulk search-and-replace.
Works for hundreds of columns automatically, keeps visuals and measures intact, and is easy to maintain.