Forum Discussion

paulfink's avatar
paulfink
Post Patron
5 years ago
Solved

Reorder Columns

Hi guys,

 

I need to reorder my columns so i can merge two tables as i need the two tables to be in the exact same format.

 

I have reordered in the excel manually and the merge does work but i do not want to have to manually order it as power bi should do be able to do this for me.

 

I know that if you go into transform data and move them around in there that if will not change in the Data View.

 

Is there a formula i could use to reorder them?

  • Hi, paulfink 

    According to your description, you want to reorder your columns in order to merge two tables as you need the two tables to be in the exact same format. Why you need the two tables to be in the exact same format to merge them?

    We usually use the “Merge query” in Power Bi to do the merge operations, we can set the merge columns manually and the order of your columns has nothing to do with the output of the “Merge query”.

     

     

    In my opinion, the order of the columns in the data view is based on the order in which they are inserted into the dataset. Therefore, the only way to change the column order in the data source or change the steps in the Power Query.

    (The newly inserted column will be on the right, and the columns imported from the data source will be on the left)

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

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

    Hi, paulfink 

    According to your description, you want to reorder your columns in order to merge two tables as you need the two tables to be in the exact same format. Why you need the two tables to be in the exact same format to merge them?

    We usually use the “Merge query” in Power Bi to do the merge operations, we can set the merge columns manually and the order of your columns has nothing to do with the output of the “Merge query”.

     

     

    In my opinion, the order of the columns in the data view is based on the order in which they are inserted into the dataset. Therefore, the only way to change the column order in the data source or change the steps in the Power Query.

    (The newly inserted column will be on the right, and the columns imported from the data source will be on the left)

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.