Generally, the data that we get from the source might have a 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
Please click the Edit Queries option under the Home tab to reorder or remove unwanted columns from the existing Power BI tables.
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 and country codes, which are not required for the analysis purpose. So, let me remove those columns from this Geography table.
Remove Columns in Power BI
To remove Power BI columns, please select the Column you want to remove and right-click on it to open the context menu. Select the Remove option from the context menu
Now, you can see that the State-Province Code column was 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 selecting the Remove Other Columns option from the context menu.
As you can see, all the other columns except City were 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 the 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 changes are applied.