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?
Subtotal column and row fields
Display or hide column and row grand totals for the entire report
Calculate the subtotals and grand totals with or without filtered items
Subtotal row and column fields
- Select an item of a row or column field in a PivotTable report.
- On the
Optionstab, in theActive Fieldgroup, clickField Settings.The
Field Settingsdialog box is displayed. -
Do one of the following:
Subtotal an outer row or column label
- To subtotal by the default summary function, under
Subtotals, clickAutomatic. - Optionally, to use a different function or to display more than one type of subtotal, click
Custom, 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 worksheet 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 Nums summary function works the same as the COUNT worksheet 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 with an OLAP data source.
- 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:
- On the
Designtab, in theLayoutgroup, clickSubtotals. - 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.
- Select
- On the
Subtotal an inner row or column label
- To choose a function, under
Subtotals, clickCustom, 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 worksheet 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 Nums The number of data values that are numbers. The Count Nums summary function works the same as the COUNT worksheet 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 with an OLAP data source.
Remove subtotals
- Click
NoneunderSubtotals.
Note If a field contains a calculated item , you can't change the subtotal summary function.
- To subtotal by the default summary function, under
- Select or clear the
Include new items in manual filtercheck box to include or exclude new items when applying a filter in which you have selected specific items in the Filter menu.
Tip To quickly display or hide the current subtotal, right-click the item of the field, and then select Subtotal "<Label name>".
Display or hide grand totals for the entire report
You can display or hide the totals for the current PivotTable report.
Display or hide grand totals
- Click the PivotTable report.
- On the
Designtab, in theLayoutgroup, clickGrand Totals, and then select one of the following:Off for Rows and ColumnsOn for Rows and ColumnsOff for Rows OnlyOn for Columns Only
Set the default behavior for displaying or hiding grand totals
- Click the PivotTable report.
- On the
Optionstab, in thePivotTablegroup, clickOptions.The
PivotTable Optionsdialog box is displayed. - Click the
Totals & Filterstab. - Do one of the following:
Display grand totals
- Select the
Show grand totals for columnscheck box, theShow grand totals for rowscheck box, or both.
Hide grand totals
- Clear the
Show grand totals for columnscheck box, theShow grand totals for rowscheck box, or both.
- Select the
Calculate the subtotals and grand totals with or without filtered items
- Click the PivotTable report.
- On the
Optionstab, in thePivotTablegroup, clickOptions.The
PivotTable Optionsdialog box is displayed. - Click the
Total & Filterstab, and then do one of the following:OLAP source data Do one of the following:
- Select or clear the
Subtotal filtered page itemscheck 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.
non-OLAP source data Select or clear the
Allow multiple filters per fieldcheck box to include or exclude filtered items in totals. - Select or clear the
![]()