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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Will my query update if the column are moved?

Hello,

 

I have a Excel with data. For my macros I need the colums to be in a specific order. However my colleagues like to move the colums around. Now I thought I can make a query that gives me the colums in the specific order.

 

Will the query I once set up still work after the colums have been moved around? Does PowerQuery look for the header of the table or for the columb the data is placed?

 

Hope my explanation was sufficient.

 

Kind regards

Max

1 ACCEPTED SOLUTION
Anonymous
Not applicable

If your header is written in M code (PowerQuery code), then your column wll be used in other step. If you or your colleagues want to change the name of column, you should use =Table.Combine(PreviouStepName[data]) and in the next step should choose this column.

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@Anonymous 

 

Any steps you executed in power query are recorded by M language, they will not effect the connection with the datasource. All queries will able to update unless you change the table/column names in the datasource.

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

If your header is written in M code (PowerQuery code), then your column wll be used in other step. If you or your colleagues want to change the name of column, you should use =Table.Combine(PreviouStepName[data]) and in the next step should choose this column.

 

Anonymous
Not applicable

Thanks!

 

If I Insert a couple of colums in the raw data, the query will also insert those colums. How can I do the query only for the colums I want? If some colums in the raw data are added, do I have to change the query?

JoaoPereira
Frequent Visitor

Hey!

 

I just tested it on Power Query. As long as one of your steps is Reordering Columns and the headers of the columns in your table don't change names, it won't influence anything. Your Query will always set them to the specific order you have chosen.

 

Hope this helps.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors