Sub topic 1
Building an Excel PivotTable to Summarise Data
A PivotTable is an Excel report that groups records and calculates summaries without changing the source data. It is useful when you need to answer questions such as “How much did each region sell?” or “How many units were sold by month?”
Prerequisites
You should know how to navigate worksheets, select ranges, enter records, and use simple formulas such as SUM.
What a PivotTable Does
A PivotTable turns detailed rows into a compact summary. You choose which fields describe groups and which fields contain measures.
| PivotTable area | Purpose | Example |
|---|---|---|
| Rows | Groups down the report | Region |
| Columns | Groups across the report | Product |
| Values | Calculates a measure | Sum of Sales |
| Filters | Limits the displayed records | Date |
The same source data can support many reports. Moving a field changes the question the report answers.
flowchart TD
A[Flat source records] --> B[Place fields in report areas]
B --> C[Grouped PivotTable]
C --> D[Totals and comparisons]Preparing Source Data
Use a flat dataset: one header row and one record per row. Each column should contain one field, such as Date, Region, Product, Units, or Sales. Avoid merged cells, blank header cells, subtotal rows, and separate sections for each region.
Date,Region,Product,Units,Sales
2025-01-05,East,Widget,10,250
2025-01-12,West,Gadget,4,180
2025-02-03,East,Gadget,7,315Keep numbers as numbers. A value that looks like 250 but is stored as text may be counted instead of summed.
Converting the Range to an Excel Table
Click inside the dataset, choose Insert > Table, and confirm that My table has headers is selected. Give the table a meaningful name, such as SalesData, under Table Design > Table Name.
An Excel Table expands when you add records below it. A PivotTable based on that table can then include those records after a refresh.
Inserting a PivotTable
Click inside SalesData, choose Insert > PivotTable, and select a new worksheet. Excel opens a blank PivotTable and the PivotTable Fields pane.
Working with the PivotTable Fields Pane
Drag fields into the four areas. For example:
- Region to Rows
- Product to Columns
- Sales to Values
- Date to Filters
Excel usually chooses Sum for numeric fields and Count for text fields. Check the choice by opening Value Field Settings. The pane is the main control surface: rearrange fields to test different views without editing the source.
Exercise
You need total Sales by Region, with Product categories across the top. Which fields go into Rows, Columns, and Values?
Show answer
Put Region in Rows, Product in Columns, and Sales in Values. Use Sum in Value Field Settings.