Subtotal and total fields in a PivotTable report

When working with a PivotTable report (PivotTable report: An interactive, crosstabulated Excel report that summarizes and analyzes data, such as database records, from various sources, including ones that are external to Excel.), 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

Top of Page Top of Page

Subtotal row and column fields

  1. In a PivotTable, select an item (item: A subcategory of a field in PivotTable and PivotChart reports. For instance, the field "Month" could have items such as "January," "February," and so on.) of a row or column field.

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

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

Excel Ribbon Image

  1. 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.

ShowFunctions 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) (OLAP: A database technology that has been optimized for querying and reporting, instead of processing transactions. OLAP data is organized hierarchically and stored in cubes instead of tables.) data source.

  • To remove subtotals, click None.

Note    If a field contains a calculated item (calculated item: An item within a PivotTable field or PivotChart field that uses a formula you create. Calculated items can perform calculations by using the contents of other items within the same field of the PivotTable report or PivotChart report.), you can't change the subtotal summary function.

  1. 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 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.

  1. 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.

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

Excel Ribbon Image

  1. 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 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.

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

Excel Ribbon Image

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

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 Top of Page

 
 
Applies to:
Excel 2010