Skip to main content

Posts

Showing posts with the label column

How to Move Date Column to the Beginning of Table

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