Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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.

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

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion
    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.
    • Anonymous's avatar
      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.

       

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Anonymous daxer? You back?

         

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

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Anonymous ,

     

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

     

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