Excel tutorial
/

PivotTables

Intermediate

PivotTable values: Sum, Count, Average and Value Field Settings

How to show count, average, max or distinct count instead of a sum in a PivotTable, rename the value column and set a number format that sticks.

The Values area is the PivotTable’s calculator. Drop a numeric field there and Excel automatically calculates a Sum. But the question is often different: “How many sales were there?”, “What is the average sale?”, “What was the biggest deal?”.

All of that is changed in one dialog — Value Field Settings. You can also put the same field into Values several times and see different calculations side by side.

Книга1 - Excel
—☐✕
D4fx13833333,33
ABCDE
1Row LabelsSum of AmountCount of AmountAverage of Amount
2Bukhara26 600 000213 300 000
3Samarkand20 500 000210 250 000
4Tashkent41 500 000313 833 333
5Grand Total88 600 000712 657 143
6
Готово
One Amount field three times: total, number of sales and average sale

Changing the calculation

1

Right-click any value in the PivotTable and choose Value Field Settings.... Alternatively, click the field name in the Values area of the pane → Value Field Settings.

Книга1 - Excel
—☐✕
B2fx26600000
ABCD
1Row LabelsSum of Amount
2Bukhara26 600 000КопироватьФормат ячеек...Числовой формат...ОбновитьСортировкаОперацияДополнительные вычисленияПоказать деталиПараметры полей значений...Параметры сводной таблицы...Скрыть список полей
3Samarkand20 500 000
4Tashkent41 500 000
5Grand Total88 600 000
6
Готово

2

In the Summarize value field by list pick the calculation: Average, Count, Max / Min. The name in Custom Name updates automatically.

Книга1 - Excel
—☐✕
B2fx26600000
ABCD
1Row LabelsSum of Amount
2Bukhara26 600 000
3Samarkand20 500 000
4Tashkent41 500 000
5Grand Total88 600 000
6
Готово

3

Type a clear Custom Name, such as “Average sale”. Note: the name can’t be identical to a source column name — type “Amount” and Excel says “PivotTable field name already exists”. Workaround: add a trailing space (“Amount ”) or pick another name.

4

In the same dialog click Number Format, choose the Number category, set Decimal places to 0 and tick Use 1000 Separator (,). The format is applied to the whole field and survives refreshes.

Книга1 - Excel
—☐✕
B4fx13833333,33
ABCD
1Row LabelsAverage of Amount
2Bukhara13300000
3Samarkand10250000
4Tashkent13833333,33
5Grand Total12657142,86
6
Готово
Unformatted average: 13833333.33. After Number Format: 13,833,333

5

Need several calculations side by side? Drag Amount into Values again — Sum of Amount2 appears. Switch it to Count and a third copy to Average (the result above).

Which calculation for what

  • Sum — revenue, quantity, costs. The default for numeric fields.
  • Count — the number of non-empty cells (text counts too): how many sales, how many orders. The default for text fields.
  • Average — average sale, average score.
  • Max / Min — the biggest sale, the lowest price.
  • Count Numbers — only cells that contain numbers.
  • Product, StdDev, Var — product, standard deviation, variance for statistical analysis.

Important: the Grand Total row uses the same calculation. For Average, the Grand Total is the average of all sales (12,657,143), not the average of the regional averages.

Pro level: Distinct Count

A regular PivotTable has no Distinct Count. It appears only in a PivotTable based on the Data Model:

  1. In the create dialog tick Add this data to the Data Model.
  2. Drop the Manager field into Values.
  3. Value Field Settings → pick Distinct Count at the bottom of the list.

A Data Model PivotTable can also combine several related tables. The trade-off: instead of Calculated Fields and manual date grouping you use DAX measures (Power Pivot).

Книга1 - Excel
—☐✕
C4fx2
ABCD
1Row LabelsCount of ManagerDistinct Count of Manager
2Bukhara21
3Samarkand21
4Tashkent321
5Grand Total74
6
Готово
Tashkent has 3 sales but 2 managers: the difference between Count and Distinct Count

Try it in the simulator

Check Count and Average with formulas. Type =СЧЁТЕСЛИМН($A$2:$A$8;D2) in E2 and =СРЗНАЧЕСЛИМН($B$2:$B$8;$A$2:$A$8;D2) in F2, then fill both down to row 4. Tashkent: 3 sales, average 13833333.33.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1RegionAmountRegionSalesAverage sale
2Tashkent25500000Bukhara
3Samarkand12000000Samarkand
4Tashkent6400000Tashkent
5Bukhara17000000
6Samarkand8500000
7Tashkent9600000
8Bukhara9600000
9
10
11
12
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

60 / 154