Generally, the data that we get from the source might have few columns that may not required for the analysis purpose. In this article, we will show you, the steps required to Remove or Reorder Columns in Power BI with example.
How to Remove or Reorder Columns in Power BI
In order to reorder columns, or remove unwanted columns from the existing tables, please click Edit Queries option under the Home tab.
Clicking Edit Queries option will open a new window called Power Query Editor.
From the below 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 Geography table
Remove Columns in Power BI
Please select the Column that you want to remove and right-click on it will open the context menu. Select the Remove option from the context menu
Now, you can see that the State Province Code column is removed from the table. And you can see the same under 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 are 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 demonstration purpose, we are dragging Country Column to the second position (after geography Key).
Now you can see the Country names at 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 at third position. Next, hit Close & Apply option under the Home tab to apply these changes.
Please wait until the changed are applied