IncludeGroupAggregates
✖
IncludeGroupAggregates
Details

- With the default setting IncludeGroupAggregatesFalse, aggregation summaries are not included.
- With the setting IncludeGroupAggregatesTrue, PivotTable returns a Tabular object with additional rows and columns with key All or ExtendedKey[…,All], containing aggregated information about groups of rows and columns.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Take tabular data containing four columns:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-0k0hzs
Compute the mean age per "sex" and "class" groups, ignoring the "survived" column:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-fdve6o

Include group aggregates for each column and each row:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-nq3k2a

Scope (1)Survey of the scope of standard use cases
Make a pivot table showing the percent survival for the Titanic:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-isst5r

By default, PivotTable does not add group summaries:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-wrgy4a

Show group summaries, with a row and a column of key All:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-iq2hov

Applications (1)Sample problems that can be solved with this function
The data contains information on kidney transplant patients—time in days to death or on-study time since transplant at the given age:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-wn77do

Use the PivotTable to compute the patients' mean survival time in years split according to alive status versus gender and race, including the summary groups:

https://wolfram.com/xid/0bsw06mcpnbc36inp4-ry7nzf

Wolfram Research (2025), IncludeGroupAggregates, Wolfram Language function, https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html.
Text
Wolfram Research (2025), IncludeGroupAggregates, Wolfram Language function, https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html.
Wolfram Research (2025), IncludeGroupAggregates, Wolfram Language function, https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html.
CMS
Wolfram Language. 2025. "IncludeGroupAggregates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html.
Wolfram Language. 2025. "IncludeGroupAggregates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html.
APA
Wolfram Language. (2025). IncludeGroupAggregates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html
Wolfram Language. (2025). IncludeGroupAggregates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html
BibTeX
@misc{reference.wolfram_2025_includegroupaggregates, author="Wolfram Research", title="{IncludeGroupAggregates}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html}", note=[Accessed: 18-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_includegroupaggregates, organization={Wolfram Research}, title={IncludeGroupAggregates}, year={2025}, url={https://reference.wolfram.com/language/ref/IncludeGroupAggregates.html}, note=[Accessed: 18-March-2025
]}