How can I change the order of columns in Power BI?

Power BI is a powerful data visualization and business intelligence tool that allows users to create visually appealing and interactive reports and dashboards. One of its key features is the ability to change the order of columns in a dataset. This allows users to rearrange and customize their data to better suit their needs and make it more meaningful and informative. By simply selecting the desired columns and dragging them to the desired position, users can easily change the order of columns in Power BI and enhance their data analysis and presentation capabilities. This feature provides users with greater flexibility and control over their data, making it an essential tool for effective data management and analysis.

Change Order of Columns in Power BI


Often you may want to change the order of columns in two different scenarios in Power BI:

Scenario 1: Change Order of Columns in Table View

Scenario 2: Change Order of Columns in a Table in Report View

The following examples show how to change the order of columns in both scenarios.

Example 1: Change Order of Columns in Table View

Suppose we have the following table in Power BI named my_data that contains information about various basketball players:

Suppose that we would like to change the columns to be in the following order:

  • Team
  • Rebounds
  • Assists
  • Points

The easiest way to do this is by using the SELECTCOLUMNS function in DAX to create a new table in which the columns are in the exact order that you specify.

To do so, click the Table tools tab and then click the New table icon:

Then type the following formula into the formula bar:

New Table = 
SELECTCOLUMNS (
    my_data,
    "Team", my_data[Team],
    "Rebounds", my_data[Rebounds],
    "Assists", my_data[Assists],
    "Points", my_data[Points]
)

This will create a new table named New Table in which the columns are in the exact order that we specified:

Power BI change order of columns

Note: You can find the complete documentation for the SELECTCOLUMNS function in DAX .

Example 2: Change Order of Columns in a Table in Report View

Suppose we insert the following table in Report View that summarizes the points, assists and rebounds for each unique team:

Suppose that we would like to change the columns in the table to be in the following order:

  • Team
  • Sum of Rebounds
  • Sum of Assists
  • Sum of Points

The easiest way to do so is by clicking and dragging the column names up or down within the Columns pane of the Visualizations tab to the exact order that you’d like:

Power BI change column order in table in Report View

Notice that the columns in the table are now in the exact order that we specified.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x