Advanced Excel · Beginner level

Beginner level · Module 4: PivotTables and PivotCharts · Lesson 2 of 3

Grouping and Calculations in PivotTables

Group dates and numbers, add calculated fields and show values as percentages or running totals.

In this lesson you will

  • Group dates by month and quarter
  • Use calculated fields and show-values-as options

Key concepts

groupingcalculated field% of totalrunning total

The lesson

Group dates into months, quarters or years, and numbers into bands such as order sizes. This turns daily records into readable trends.

A calculated field creates a value from other fields, such as profit = sales − cost. Show Values As displays values as a percentage of the total, of a row or as a running total.

Sort and filter within PivotTables to find top products or customers, for example the top 10 by sales.

Step by step

  1. Group sales dates by month.
  2. Add a calculated profit field.
  3. Show each branch's share of total sales.
  4. List the top five customers.
Data and chart

Monthly sales by branch from a PivotTable

A PivotTable groups four months of transactions by month and branch, and a PivotChart shows the trend.

Sum of sales (SSP) by month and branch — PivotTable output from the distributor's Sales table (illustrative data)
MonthJubaWau
Jan210,00095,000
Feb230,000101,000
Mar198,000120,000
Apr245,000131,000
Monthly sales by branch (SSP) Juba: Jan 210,000, Feb 230,000, Mar 198,000, Apr 245,000. Wau: Jan 95,000, Feb 101,000, Mar 120,000, Apr 131,000 075,000150,000225,000300,000JanFebMarAprJubaWau

What the data shows

Juba sells about twice as much as Wau (883,000 vs 447,000 SSP over the four months), but Wau is growing faster: up 37.9% from January to April, against 16.7% for Juba.

Juba's dip in March, while Wau kept growing, is worth investigating — a stock shortage or a closed day would show up in the underlying transactions.

Recommendation

Add a slicer for product category to see which products drive Wau's growth and Juba's March dip, then double-click the March Juba cell to drill into the transactions behind it.

Practice activity

Answer the remaining practical questions with grouping and calculations.

Expected result: Correct trends, shares and top lists, with one figure checked by SUMIFS.

Check your understanding

  1. How do you see sales as a share of the total?

    Show answer

    Use Show Values As > % of Grand Total.

  2. What is a calculated field?

    Show answer

    A PivotTable value computed from other fields.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.