Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
I’ve written a many-step query, and now I want to rename a column from an early step. When I do, any subsequent steps that reference this column break. I’m surprised that it doesn’t update the name everywhere it is used after the change. Is there a quick way to "Find and Replace All" instances of a column name? Right now I’m copy-pasting to a notepad, performing the replacement, then copy-pasting the M code back into the Advanced Editor. Not a big deal, it just seems extra.
Thanks, JO
Hi @olander ,
Please try to get the column names firstly, then by the index to get the name and use the name in the next M function.
For more details, you can read related document: Table.ColumnNames - PowerQuery M | Microsoft Learn
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That doesn’t qualify as a "quick way to 'Find and Replace All'." So you are saying that no such functionality exists in Power Query for updating string literal column names quickly?
Hi @olander ,
Please try Table.RenameColumns().
For more details, you can read related document: Table.RenameColumns - PowerQuery M | Microsoft Learn
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your replies. Unfortunately, you are still not answering my question. Table.RenameColumns is only guaranteed not to break a query if it is used before adding any additional steps.
In my case, I have a query with multiple steps, and I would like to go to an early step (say where I created a column) and rename a column. The column I wish to rename is referenced several times in subsequent steps. When I rename the column, those steps break. They are still using the old name. How can I repair those steps while keeping the earlier column name change?
Thank you