Generally, the data we get from the source may have few columns that may not be necessary for the purpose of the analysis. Let me show you the steps 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 existing Power BI tables, click Edit queries option under the Home tongue.
By clicking on the Edit queries The option opens a new window called Power Query Editor.
In the following Power BI screenshot, you can see that there are status codes, country codes, which are not required for analysis. So, let me remove those columns from this Power BI geography table
Remove columns in Power BI
To delete Power BI columns, select the column you want to delete and right-click on it to open the context menu. Select the Remove context menu option
Now, you can see that the State-Province Code column was removed from the table. And you can see the same under the Steps applied section.
Use Remove other columns option to remove all columns from table except selected columns.
For demonstration purposes, I select City and select the Remove other columns context menu option.
As you can see, all other columns except City have been removed from the Geography table.
Alternatively, you can click the Remove columns button below Home Tongue
Similarly, we remove the remaining unwanted columns.
Reorder columns in Power BI
Drag the required column and drop it to the position you want to place. For the demonstration purpose of reordering Power BI columns, we are dragging the country column to the second position (after the geography key).
Now you can see the names of the countries in the second position
Alternatively, right-click on the name of the column you want to move to open the context menu. Please select the Move and then select Right, Left, Until the end, or Starting option
Now you can see the State in the third position. Then press the Close and apply option under the Home tab to apply these changes.
Please wait until the changes are applied