The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
Solved! Go to Solution.
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
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.
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.
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?
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.