The order of columns in Power BI might not seem important but there are some scenarios when locations of columns matter. For my latest project, I needed to append tables with DAX using "UNION" function at Power BI Desktop and I needed my date column at the beginning of the table, like the other table which I am going to append, but it was at the end like you can see below:
I can almost hear you saying "That's easy. Go to the Query Editor, right-click on the column, and select Move To beginning."

Honestly, I
wouldn't be writing this if it had been worked. That step moved my column to
the beginning of the table at Query Editor but not at Power BI desktop. After I
close and apply, I saw my date column at the end of the table again. Hopefully,
there is a very simple solution to this problem. First, we go back to our
almighty Power Query Editor. On queries pane, we right-click on the table that
has the date column, select Advanced Editor, and copy all the content.

Our next step is opening a new Blank Query and pasting what we copied to the Advanced Editor of our new Blank Query.

Congratulations! We have successfully copied our table. This time you are going to see that our date column is at the beginning of the table in both Query Editor and Power BI Desktop. That happens because when you create a new blank query Advanced Editor put the date column to the beginning automatically. Keep in mind that you might need to rename the new table, delete the old one, and check your relationships.
Comments