Remove or Reorder Columns in Power BI
Generally, the data that we get from the source might have few columns that may not require for the analysis purpose. Let me show you the steps required to Remove or Reorder Columns in Power BI with an example.
How to Remove or Reorder Columns in Power BI
To reorder columns, or remove unwanted columns from the existing Power BI tables, please click Edit Queries option under the Home tab.
Clicking the Edit Queries option opens a new window called Power Query Editor.
From the below Power BI screenshot, you can see there are State codes, country codes, which are not required for the analysis purpose. So, let me remove those columns from this Power BI Geography table
Remove Columns in Power BI
To remove Power BI columns, please select the Column that you want to remove and right-click on it open the context menu. Select the Remove option from the context menu
Now, you can see that the State-Province Code column removed from the table. And you can see the same under the Applied Steps section.
Use Remove Other Columns option to remove all the columns from the table except the selected columns.
For the demonstration purpose, I am selecting City and selected the Remove Other Columns option from the context menu.
As you can see, all the other columns except City removed from the Geography table.
Alternatively, you can click on the Remove Columns button under the Home Tab
Similarly, we removed the remaining unwanted columns.
Reorder Columns in Power BI
Drag the required column and Drop at the position you want to place. For the Power BI reorder columns demonstration purpose, we are dragging Country Column to the second position (after geography Key).
Now you can see the Country names in the second position
Alternatively, right-click on the column name that you want to move will open the context menu. Please select the Move and then select Right, Left, To End, or To Beginning option
Now you can see the State in the third position. Next, hit the Close & Apply option under the Home tab to apply these changes.
Please wait until the changed are applied