Subtotal and total fields in a PivotTable report

When working with a PivotTable report, you can display or hide subtotals for individual column and row fields, display or hide column and row grand totals for the entire report, and calculate the subtotals and grand totals with or without filtered items.

What do you want to do?

Watch a video

Subtotal row and column fields

Display or hide grand totals for the entire report

Calculate the subtotals and grand totals with or without filtered items

Watch a video

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

Top of Page

Subtotal row and column fields

  1. In a PivotTable, select an item of a row or column field.

    This displays the PivotTable Tools, adding the Options and Design tabs.

  2. On the Options tab, in the Active Field group, click Field Settings.

    Excel Ribbon Image

  3. In the Field Settings dialog box, under Subtotals, do one of the following:

    • To subtotal an outer row or column label using the default summary function, click Automatic.

    • To use a different function, to display more than one type of subtotal, or to subtotal an inner row or column label, click Custom (if this option is available), and then select a function.

      Functions that you can use as a subtotal

      Function

      Description

      Sum

      The sum of the values. This is the default function for numeric data.

      Count

      The number of data values. The Count summary function works the same as the COUNTA function. Count is the default function for data other than numbers.

      Average

      The average of the values.

      Max

      The largest value.

      Min

      The smallest value.

      Product

      The product of the values.

      Count Numbers

      The number of data values that are numbers. The Count Numbers summary function works the same as the worksheet COUNT function.

      StDev

      An estimate of the standard deviation of a population, where the sample is a subset of the entire population.

      StDevp

      The standard deviation of a population, where the population is all of the data to be summarized.

      Var

      An estimate of the variance of a population, where the sample is a subset of the entire population.

      Varp

      The variance of a population, where the population is all of the data to be summarized.

      Note    You cannot use a custom function that uses an Online Analytical Processing (OLAP) data source.

    • To remove subtotals, click None.

      Note    If a field contains a calculated item, you can't change the subtotal summary function.

  4. To include or exclude new items when applying a filter in which you have selected specific items in the Filter menu, select or clear the Include new items in manual filter check box.

Tips    

  • To quickly display or hide the current subtotal, right-click the item of the field, and then select or clear the check box next to Subtotal "<Label name>".

  • For outer row labels in compact or outline form, you can display subtotals above or below their items, or hide the subtotals, by doing the following:

    1. On the Design tab, in the Layout group, click Subtotals.

    2. Do one of the following:

      • Select Do Not Show Subtotals.

      • Select Show all Subtotals at Bottom of Group.

      • Select Show all Subtotals at Top of Group.

Top of Page

Display or hide grand totals for the entire report

You can display or hide the grand totals for the current PivotTable. You can also specify default settings for displaying and hiding grand totals

Display or hide grand totals

  1. Click anywhere in the PivotTable report.

    This displays the PivotTable Tools, adding the Options and Design tabs.

  2. On the Design tab, in the Layout group, click Grand Totals, and then select the grand total display option that you want.

    Excel Ribbon Image

Change the default behavior for displaying or hiding grand totals

  1. Click the PivotTable report.

    This displays the PivotTable Tools, adding the Options and Design tabs.

  2. On the Options tab, in the PivotTable group, click Options.

    Excel Ribbon Image

  3. In the PivotTable Options dialog box, on the Totals & Filters tab, do one of the following:

    • To display grand totals, select the Show grand totals for columns check box, the Show grand totals for rows check box, or both.

    • To hide grand totals, clear the Show grand totals for columns check box, the Show grand totals for rows check box, or both.

Top of Page

Calculate the subtotals and grand totals with or without filtered items

  1. Click anywhere in the PivotTable report.

    This displays the PivotTable Tools, adding the Options and Design tabs.

  2. On the Options tab, in the PivotTable group, click Options.

    Excel Ribbon Image

  3. In the PivotTable Options dialog box, on the Total & Filters tab, do one of the following:

    • For Online Analytical Processing (OLAP) source data, do one of the following:

      • Select or clear the Subtotal filtered page items check box to include or exclude report filter items.

        Note    The OLAP data source must support the MDX expression subselect syntax.

      • Select or clear the Mark totals with * check box to display or hide an asterisk next to totals. The asterisk indicates that the visible values that are displayed and that are used when Excel calculates the total are not the only values that are used in the calculation.

        Note    This option is only available if the OLAP data source does not support the MDX expression subselect syntax.

    • For non-OLAP source data, select or clear the Allow multiple filters per field check box to include or exclude filtered items in totals.

Top of Page

Applies To: Excel 2010



Was this information helpful?

Yes No

How can we improve it?

255 characters remaining

To protect your privacy, please do not include contact information in your feedback. Review our privacy policy.

Thank you for your feedback!

Support resources

Change language