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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Reordering Columns in Power Query not Reordering in Data View

Hello:

 

I have a very simple problem to solve (I think). I need to reorder columns in my table for when I copy and paste it to another program. Right now, I am able to enter into Power Query and move columns as I need to, but when I apply and save and go to Copy Table from the Data pane, the columns are still in their original positions.

 

I should say that I am using an API, in case that affects anything.

 

Also, if anyone can point me towards a better way to export to excel than Copy Table, I'd be grateful.

 

Thank you.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Just to be clear on your process, you are reordering your columns in Power Query, saving and closing, refreshing and then in Desktop you right-click the table and choose Copy Table?

Just one item on this as a comment. I have seen column reordering steps add a considerable amount of time for refresh. So, once you get this sorted out I would highly recommend removing that step as it is kind of useless in general.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
SLand
New Member

It happens to me exactly as described.

I order the columns for easy understanding into PowerQuery, but in my case, when I close and Apply the changes, everything goes Ok, except for the columns order.

I tried updating twice, changing the order of the reorder command, but was useless... just creating a new query and copy-paste the original query from the Advance query editor, worked for me.

Not sure if by now there is another solution.

v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try to add an index column based on the ordering column in the query editor.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Greg_Deckler
Super User
Super User

Just to be clear on your process, you are reordering your columns in Power Query, saving and closing, refreshing and then in Desktop you right-click the table and choose Copy Table?

Just one item on this as a comment. I have seen column reordering steps add a considerable amount of time for refresh. So, once you get this sorted out I would highly recommend removing that step as it is kind of useless in general.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

 

LUCKILY for you guys - ALL you have to do to fix this bug is go to Advanced Editor of the Query that is not re-ordering correctly. Copy the Text version of the query. Create a new blank Query, copy and paste the broken query's text into, refresh the query, and then delete the old one.

 

Your new query will have the right order - this has something to do with cacheing possibly - but renaming the query and clearing caches + restart did not fix it for me... Only re-creating the query worked.

 

 

@quant77 daxer? You back?

 

A response so terrible it solved the problem and was accepted as the solution. Sure.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.