Pivot Table Issues

How to Calculate the Average of PivotTable Aggregate Values

Khadija KhanKhadija Khan Nov 3, 2026 870 views

Question details

The user needs to calculate the average of the visible summarized totals (aggregate values) in a PivotTable rather than the arithmetic mean of the underlying raw data records.

How to Calculate the Average of PivotTable Aggregate Values
Product
Spreadsheet Software
Device & OS
not provided
Scenario
Working with a PivotTable where standard summary functions calculate the average based on every individual row in the source data, but the goal is to average the grouped row or column subtotals.
Observed behavior
Standard PivotTable average functions return the mean of the base records, completely ignoring the visual aggregations displayed in the rows and columns.
Before you start

Ensure your source data is formatted as a Table to prevent missing data ranges, and verify whether your spreadsheet software supports Data Models or Power Query.

Solution 1Recommended

Use a Data Model and DAX Measures (Power Pivot)

Use Power Pivot's Data Analysis Expressions (DAX) to create an iterating measure that calculates averages based on the visible aggregated categories rather than underlying rows.

Standard PivotTable calculations do not iterate over subtotals natively. By adding your data to the Data Model, you can use the AVERAGEX function to force the PivotTable to first sum the data by category, and then calculate the average of those sums.

1
Add Data to the Data Model

Select your source data, click Insert > PivotTable, and check the box that says 'Add this data to the Data Model'.

2
Create a Base Aggregate Measure

Open the Power Pivot window or use the Measures option to create a new DAX measure that sums your target column (e.g., Total Sales = SUM([Sales])).

3
Create the AVERAGEX Measure

Create a second measure using AVERAGEX to iterate over your categories. For example: AVERAGEX(VALUES('Table'[Category]), [Total Sales]).

4
Add Measure to PivotTable

Place this newly created AVERAGEX measure into the Values area of your PivotTable to display the average of the aggregated values.

Use a Data Model and DAX Measures (Power Pivot)
Requirement: This solution requires a spreadsheet version that includes Power Pivot and Data Model features, such as Microsoft Excel 365 Professional Plus.

Easily Analyze and Summarize Data with WPS Spreadsheet

WPS Spreadsheet offers powerful, intuitive PivotTable functionalities. While highly complex DAX calculations require specialized plugins, you can effortlessly calculate the average of aggregate values in WPS by utilizing multi-tier data grouping, helper tables, and advanced formula extraction.

  1. 1. Insert a PivotTable: Open your dataset in WPS Spreadsheet, select your data range, and click Insert > PivotTable.
  2. 2. Configure Row and Value Fields: Drag your main categories into the Rows area and the fields you want to summarize into the Values area.
  3. 3. Extract and Average: Use the GETPIVOTDATA function in an adjacent cell to reference the aggregated totals, then wrap them in an AVERAGE function to achieve your goal.
Free and lightweight spreadsheet softwareHighly compatible with Microsoft Excel (.xlsx) files and standard PivotTable structuresIntuitive PivotTable creation with robust Value Field SettingsSeamless data extraction using GETPIVOTDATA and standard formulas
microsoft office alternative - wps office

Frequently Asked Questions

Why does changing the summary function to Average give me the wrong number?

When you right-click a PivotTable value and change 'Summarize Values By' to 'Average', the software calculates the arithmetic mean of every individual underlying row that makes up that category, not the average of the summarized subtotals you see on the screen.

Can I use a Calculated Field to average PivotTable subtotals?

Standard Calculated Fields in PivotTables operate on the sum of the underlying base data. Because of this structural limitation, a Calculated Field cannot independently iterate through and average visible subtotals without using external data models.

What is the difference between AVERAGE and AVERAGEX?

AVERAGE is a standard function that calculates the mean of a specific column. AVERAGEX is an iterating DAX function used in Data Models that evaluates an expression (like a sum) for every row of a given table or category, and then averages those results.