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

Join 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.

Reply
olander
Frequent Visitor

Column name doesn’t update in subsequent Power Query steps

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

4 REPLIES 4
Anonymous
Not applicable

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.

vbinbinyumsft_0-1678329455840.png

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?

Anonymous
Not applicable

Hi @olander ,

Please try Table.RenameColumns().

vbinbinyumsft_1-1678341250907.png

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 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.