The easiest way to sort a pivot table in Google Sheets is to use the Sort by function within the Pivot table editor panel.
The following example shows how to use this function in practice.
Example: Sort a Pivot Table in Google Sheets
Suppose we have the following pivot table in Google Sheets:
Click on any cell in the pivot table to bring up the Pivot table editor panel.
Within the Pivot table editor panel, click the dropdown arrow next to Sort by within the Rows section and choose SUM of Sales:
The rows of the pivot table will automatically be sorted by the SUM of Sales column, ascending:
To instead sort the rows in descending order, simply click the dropdown arrow next to Order and select Descending:
The rows of the pivot table will automatically be sorted by the SUM of Sales column, descending:
Additional Resources
The following tutorials explain how to perform other common operations in Google Sheets:
Google Sheets: How to Format Pivot Tables
Google Sheets: How to Add Calculated Field in Pivot Table
Google Sheets: Display Percentage of Total in Pivot Table