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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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.


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
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.


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

 

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.

 

 

This solved the issue for me as well.

No matter what I did to change column order in the Power Query Editor, they didn't update in Table view. Restarted the app, nope. Saved under a new file name, nope. Refresh, nope. Nothing worked.

Then all I did was copy the query string from advanced editor, re-imported the data and pasted the exact same string into the advanced editor and when I got back to table view my columns were now ordered properly.

@Anonymous daxer? You back?

 

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



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors