A pivot table takes a list of rows and produces a summary: totals, counts or averages, grouped by whatever categories you choose. With clean source data, your first one takes about five minutes to build. Cleaning messy data takes longer, and most of the errors beginners make come from that step rather than from the pivot itself.
This guide covers how pivot tables work, when to use them instead of formulas or charts, the mistakes that produce wrong totals, and a worked example you can reproduce. The steps apply to Microsoft Excel and Google Sheets. Menu names differ slightly between versions, and where they do, the difference is noted.
How a Pivot Table Works
SOP 2.1: Source data requirements
A pivot table can only summarise what it can read cleanly. Before you insert one, check the following.
- The first row contains a header for every column, and each header is unique.
- There are no blank rows or blank columns inside the data block.
- There are no merged cells in the data.
- Each column holds one type of value. A Revenue column should contain only numbers, not a mix of numbers and text such as “£120 approx.”
- There are no subtotal or grand total rows inside the data. These get counted a second time.
If any of these fail, fix the data first. The pivot table will still build, but the totals will be wrong or incomplete, and the sheet will not warn you.
SOP 2.2: The four field areas
Every pivot table is built from four areas. You drag fields into them, and the layout updates immediately.
- Rows answer “what are the groups down the side?”
- Columns answer “what are the groups across the top?”
- Values answer “what number am I calculating for each group?”
- Filters answer “which subset of the data should be included?”
A simple summary uses one row field and one value field. A cross-tabulation uses one row field, one column field and one value field. Adding more than two grouping fields usually makes the output harder to read, not more useful.
SOP 2.3: Choosing the value calculation
The default calculation is usually Sum for numeric fields and Count for text fields. Change it when the default answers the wrong question.
- Sum gives totals: total revenue, total units.
- Count gives the number of rows in each group: how many transactions, how many orders.
- Average gives the mean per row: average order value.
- Max and Min give the highest and lowest values in each group.
Do not average averages. If each region has an average order value, the average of those regional averages is not the overall average unless every region has the same number of orders. For an overall average, put the raw order value in Values and set the calculation to Average at the top level.

Skip the setup
BalanceBloom Bookkeeping Studio
Income, expenses, profit and loss and sales tax in one bookkeeping workbook for Excel and Google Sheets.
Build Your First Pivot Table
SOP 3.1: Build sequence
Follow these steps in order. The example in Module 8 uses the same sequence.
- Click any cell inside your source data. You do not need to select the whole range by hand.
- In Excel, go to Insert, then PivotTable. In Google Sheets, go to Insert, then Pivot table.
- Confirm the source range in the dialogue. Choose a new worksheet for the output unless you have a clear reason to keep it beside the data. A separate sheet avoids the pivot output colliding with other content.
- Drag one categorical field, such as Region, into Rows.
- Drag one numeric field, such as Revenue, into Values. Check that the calculation is Sum.
- Drag a second categorical field into Columns if you need a cross-tab. Otherwise, skip this step.
- Drag a field such as Year or Sales Rep into Filters if you need to narrow the view.
- Check the totals row against a quick calculation on the source data. If they disagree, go back to Module 2 before you trust the output.
SOP 3.2: Making the output readable
- Format the value field as currency or number with the correct decimal places. In Excel, use Value Field Settings and Number Format. Changing the format on the cells themselves may not survive a refresh.
- Sort the row labels by the value field, largest first, so the biggest group appears at the top. Right-click a value in the Values column and use the sort options.
- Rename the value field header to something a reader will understand, such as “Total revenue (£)” in place of “Sum of Revenue”. Overwrite the header cell directly.
- Remove the “Grand Total” row only if it will confuse the reader. It is the check you need while building the table, so keep it until the numbers are verified.
Choosing Between Pivot Tables and Other Tools
A pivot table is one of several ways to summarise data in a spreadsheet. The right choice depends on how often the summary changes, how many groupings you need, and who has to maintain it.
| Option | Setup time | Updates when source changes | Handles many groupings | Custom logic | Best for |
|---|---|---|---|---|---|
| Pivot table | Minutes | Needs refresh in Excel; updates in Google Sheets | Yes, by dragging fields | Limited to built-in calculations and calculated fields | Exploring data, one-off or regular summaries by category |
| SUMIFS, COUNTIFS, AVERAGEIFS | Longer for each new summary | Yes, instantly | Yes, one formula per combination | Full control | Fixed reports where each cell has a known meaning |
| Google Sheets QUERY function | Moderate; requires learning the query syntax | Yes | Yes | Good, through the query language | Sheets users who want formula-based summaries that behave like a pivot |
| Power Query (Excel) | Longer first build | Yes, on refresh | Yes | Strong, with steps recorded | Combining and cleaning several files before summarising |
For a summary you will look at once, use a pivot table. For a report that other people will open every week and must not break, SUMIFS or QUERY is safer, because every cell shows its logic. For data that arrives from several sources in messy shapes, Power Query is worth the time it takes to learn.
SOP 4.1: Decision rule
Use a pivot table when all three of these are true:
- You are exploring a question, not maintaining a fixed report.
- You may want to change the grouping several times in one sitting.
- The source data is a single flat table.
Use formulas when the summary has to be audited line by line, or when it must feed another calculation in a fixed position.

Ready-made template
Ultimate Small Business Dashboard
A ready-made Excel dashboard for monthly sales, spending and profit, with charts that fill in as you log entries.
Common Mistakes and Fixes
Most wrong pivot tables come from a short list of causes. Check this list before you assume the software is at fault.
- Totals are too small. The source range was set too narrow, so new rows are missing. Convert the source data to an Excel Table (Insert, then Table), which expands automatically, and build the pivot from the table name. In Sheets, use a range that covers the full column or a named range.
- Numbers are counted instead of summed. At least one value in the column is stored as text. Left-aligned numbers are a common sign. Convert them with a clean-up step, or use VALUE or a paste-as-values pass on the source data.
- Totals are doubled. The source data contains subtotal rows, or the same transaction appears twice because of a bad join. Remove the subtotal rows from the source, not from the pivot.
- A category is missing. A filter is active, or a field has blank cells that have been hidden. Check the filter drop-downs first. Blank values appear as “(blank)” when they are present.
- The numbers have not changed after an edit. The pivot has not been refreshed. In Excel, select the pivot, then PivotTable Analyze and Refresh. Refresh all with the Data tab’s Refresh All button if the workbook has several pivots.
- Dates have grouped themselves oddly. Excel sometimes groups date fields by year, quarter and month automatically. This is useful until a column contains a single unrecognised date, after which grouping may fail. Ungroup, then regroup, once the dates are clean.
- Averages look wrong. The pivot is averaging a column that already contains averages, or the calculation was left at Sum. Check the calculation in Value Field Settings.
- Changes to the output disappear. Pivot output is generated. Typing over a value inside the pivot will be overwritten on the next refresh. Put any extra calculations beside the pivot, or add a calculated field.
SOP 5.1: Pre-build data check
Run this check before every new pivot table on data you have not used before.
- Sort each numeric column from smallest to largest. Look for text values that sort to the top or bottom.
- Scroll to the end of the data. Look for totals or notes typed under the last row.
- Count the rows in the source. Compare the count with the count in the pivot after it is built.
- Compare one total in the pivot with a simple SUM on the source data.
Worked Example
The example uses a small shop’s sales log. It has seven transactions across two regions, two products and three months. The same steps apply to a log with 7,000 rows, although the checks become more important.
Source data
| Date | Region | Rep | Product | Units | Revenue (£) |
|---|---|---|---|---|---|
| 05/01/2024 | North | Ana | Widget | 4 | 120 |
| 06/01/2024 | South | Ben | Widget | 2 | 60 |
| 12/01/2024 | North | Ana | Gadget | 1 | 85 |
| 03/02/2024 | South | Ben | Gadget | 3 | 255 |
| 09/02/2024 | North | Cara | Widget | 5 | 150 |
| 15/02/2024 | South | Cara | Widget | 1 | 30 |
| 02/03/2024 | North | Ben | Gadget | 2 | 170 |
Before building anything, run the Module 5 checks. Every column has a header. Revenue and Units contain only numbers. There are no subtotal rows. The data is one flat block, so the pivot can read it directly.
Step 1: Revenue by region
Put Region in Rows and Revenue in Values, with the calculation set to Sum.
| Region | Total revenue (£) |
|---|---|
| North | 525 |
| South | 345 |
| Grand total | 870 |
A quick check on the source confirms the total: 120 + 60 + 85 + 255 + 150 + 30 + 170 = 870. North has four transactions and South has three.
Step 2: Add a count and an average
Add Revenue to Values a second time and change its calculation to Average. Add Date (or any non-blank field) to Values with Count. The summary now shows how many transactions each region had and the average value of each.
| Region | Transactions | Average revenue per transaction (£) |
|---|---|---|
| North | 4 | 131.25 |
| South | 3 | 115.00 |
| Grand total | 7 | 124.29 |
The grand total average is 870 ÷ 7, rounded to two decimal places. It is not the average of 131.25 and 115.00, which would give 123.13. This is the averaging trap from Module 2, and it is why the grand total row needs checking.
Step 3: Cross-tab by region and product
Keep Region in Rows, move Product into Columns, and leave Revenue in Values with Sum.
| Region | Gadget (£) | Widget (£) | Total (£) |
|---|---|---|---|
| North | 255 | 270 | 525 |
| South | 255 | 90 | 345 |
| Total | 510 | 360 | 870 |
North sells more Widgets by value. South’s Gadget revenue equals North’s, which the grand total row makes visible at a glance.
Step 4: Filter to one month
Move Date into Filters, group it by month, and select February. The summary now covers only February transactions: South Gadget 255, North Widget 150, South Widget 30, for a total of 435. The grand total updates, which confirms the filter is working. Remove the filter before you share the file, or label the sheet so nobody reads February as the full picture.
Step 5: Revenue by sales rep
Swap Region for Rep in Rows. Ben has the highest revenue at 485 (60 + 255 + 170), then Ana at 205 (120 + 85), then Cara at 180 (150 + 30). The totals still add to 870. Ben’s figure includes a Gadget sale in February and one in March, so a monthly filter would show a different picture.
What the example shows
The first summary took one drag, and each subsequent view took one more. The checks mattered more than the speed. The average trap, and the filter that silently narrows the total, are the two errors that most often reach a report unnoticed.
Checklist and Decision Rule
Use this checklist each time you build a pivot table for a question that matters.
- The source is one flat table with one header row, no blank rows or columns, and no subtotals.
- Numeric columns hold numbers, and text columns hold consistent labels.
- The source range covers every row, either as an Excel Table or a named range.
- Rows, Columns, Values and Filters are each set to the grouping you intend.
- The value calculation is correct: Sum for totals, Count for transactions, Average only at the level where it is meaningful.
- One total in the pivot matches a simple calculation on the source.
- Filters are checked and the intended scope is labelled.
- The pivot is refreshed after any change to the source, and the refresh date is recorded if others will read it.
Decision rule: if the answer will be used to make a decision, verify one total against the source before you act on any other number in the summary. If the summary will be reused every week, move the logic into formulas or Power Query, so the next person can see how each figure was produced.
