Sort a table

I want to


You sort a table in the query Editor.

ShowLearn more about the Query Editor

You can access the Query Editor from the Navigator pane when connecting to a data source, or at any time from the Workbook Queries pane or the contextual Query ribbon tab for an existing query. To learn how to load the Query Editor, see Power Query Quick Start.

Sort a table based on a single column

  1. In the Query Editor Preview pane, choose the column you want to sort on.
  2. Click the down arrow (Down arrow ).
  3. From the drop-down menu, click Sort Ascending (from low to high) or Sort Descending (from high to low).

Select sort order

Top of Page Top of Page

Sort a table based on multiple columns

When you sort based upon multiple columns, the order or hierarchy of the sorting is based on the order that the columns were selected.

To sort a table based on multiple columns

  1. Select the primary column for the sort.
  2. Click the down arrow (Down arrow ).
  3. From the drop-down menu, click Sort Ascending or Sort Descending.
  4. Repeat steps 1-3 for each subsequent column you want to use for sorting.

For example, when you sort by State then Population, the final result is a table ordered by state with the cities in each state ordered by population. Alphabetically Arizona comes before California and within Arizona Phoenix has more people than Tucson. The formula lists each sort column in sort priority and the type of sort to apply to it.

Sort example

Top of Page Top of Page

 
 
Applies to:
Excel 2013, Excel 2010