How to Sort Pivot Table Grand Total Columns in Google Sheets

Published on

The Pivot table is quite useful for summarizing and reorganizing data in Google Sheets and as well as in other Spreadsheet applications. If you are using this functionality, at some point in time, you may want to sort the Grand Total columns at the bottom of the Pivot table report.

It’s possible and easy to sort the Pivot table Grand Total columns in Google Sheets. You can find all the necessary pieces of information related to this below.

The steps are not the same in Google Sheets and Excel. So, if you are an Excel user, who switched to Google Sheets, you may take time to find the required steps in Google Sheets. So I hope that you will find this tutorial helpful.

Descending Order:

Pivot Table Grand Total Columns Sorted in Descending Order

Ascending Order:

Pivot Table Grand Total Columns Sorted in Ascending Order

To sort the Pivot table Grand Total columns in ascending or descending order, you must change the settings in your Pivot table editor in the “Columns” field.

This tutorial is part of our complete guide on How to Sort and Filter Pivot Tables in Google Sheets. Learn more advanced sorting techniques, including sorting by secondary columns, custom column orders, and filtering Pivot Table results.

Steps to Sort Pivot Table Grand Total Columns

Before coming to that step, let me show you how to create the above Pivot report (without sorting).

Sample Data:

Sample Pivot Data in Sheets

First, select the data (A2:C16) and then go to the menu Insert > Pivot table.

Select “New sheet” or “Existing sheet” (you might want to select the ‘insert cell’ in this case) and click the Create button.

Inside the Pivot table editor panel, you must add (1) Rows, (2) Columns, and (3) Values.

In our data, there are three columns. Let me show you how to include these three columns in the Pivot table. You can jump to the screenshot skipping the 3 points below.

  1. Values: The values to sum are in column B (“Qty. in Gallon”). So add this column to the Values field and choose the aggregate function from the drop-down. I am choosing SUM here.
  2. Rows: I am adding the data in column A (“Date of Filling”) in this field.
  3. Columns: Now, add the last column C (“Vehicle No.”) in the Columns field.
Normal setting inside Pivot Table Editor

Our Pivot Table report is ready. Check the columns. It’s by default sorted based on the field labels (Vehicle No.).

default sort order in Pivot

Sorting Grand Total Columns in Descending or Ascending Order

To sort the Grand Total columns (the total row at the bottom) in descending or ascending order, you must edit the “Column” field inside the Pivot table editor.

Note:- If the Pivot table editor is off (closed), hover your mouse pointer over the Pivot table report. Will pop up a pencil/pen icon at the bottom corner (left-hand side). Click on it to open the panel.

Just have a look at the “Columns” field. You can see that the default sorting is “Vehicle No.” in ascending order.

You must change it to sort by “SUM of Qty. in Gallon…” (the field used in “Values” with aggregation SUM) and then select “Grand Total.”

Sorting Pivot Table Grand Total Columns

This setting will sort the above Pivot table Grand Total columns in ascending order. Just change “Ascending” to “Descending” (see the above image) to change the pivot table sort order.

Tip: We can apply the same to the Rows field (Date of Filling) total.

That’s all. Enjoy!

Additional Resources

  1. How to Use GETPIVOTDATA Function in Google Sheets.
  2. Google Sheets Pivot Table Tutorial: Basics, Setup, and Date Grouping
  3. Pivot Table Calculations & Advanced Metrics in Google Sheets
  4. Pivot Table Formatting, Output & Special Behavior in Google Sheets
Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Top Discussions

More like this

How to Sort and Filter Pivot Tables in Google Sheets (Complete Guide)

Sorting and filtering are two of the most important techniques for analyzing data in...

Pivot Table Formatting, Output & Special Behavior in Google Sheets

Pivot Tables in Google Sheets are powerful—but they can get tricky once you move...

Pivot Table Calculations & Advanced Metrics in Google Sheets

When it comes to built-in tools for data analysis and visualization in Google Sheets,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.