Skip to Content

How to Sort a Pivot Table in Google Sheets

Pivot tables are powerful tools for summarizing data. Learning to use pivot tables can seem challenging at first, but really they are quite simple to use once you understand them.

One thing you need to know when using pivot tables is how to sort your data.

By default, a pivot table will automatically sort in ascending order from A to Z, but sometimes you may want to sort things differently.

In this tutorial, I am going to show you how to sort a pivot table in Google Sheets

Sorting a Pivot Table

The key to sorting a pivot table is changing the sort order and sort by settings in the Pivot table editor:

Pivot table sort settings

To show you how to do this I will sort this pivot table by revenue from largest to smallest.

Here is my pivot table before I have sorted



Right now it is sorted by the default settings of the row in ascending order. I want to change this to sort by the revenue column from largest to smallest.

Here are the steps to do this:

1. Change the sort by settings by selecting the drop-down arrow below “Sort by” in the pivot table editor. Select the column that you want to sort by. In this example, I have set the “sort by” setting to SUM of Revenue


2. Next set your sort order under the “order” section. I want to sort from largest to smallest so I am sorting by “Descending” order. If you want to sort from smallest to largest, set it to “Ascending”


3. You should now see that your pivot table has been sorted according to the sort order that you setup in the previous steps


Closing Thoughts

Sorting a pivot table in Google Sheets is pretty simple. You just have to be aware that you have to sort it through the Pivot table editor.

If you try sorting it the way you sort a normal table it will not work.

More Google Sheets Tutorials:
How to Remove Grand Total from a Pivot Table
How to Create a Pivot Table from Multiple Sheets
How to Count Values in a Pivot Table