Pivot Tables Explained With One Real Example
Pivot tables are one of the most useful features in Microsoft Excel.
They are also one of the features people often avoid because they look more complicated than they actually are.
The easiest way to understand a PivotTable is to forget about formulas for a moment.
Imagine you have 10,000 sales transactions and somebody asks:
“How much revenue did each salesperson generate from each product?”
You could build a collection of SUMIFS formulas.
Or you could create a PivotTable and answer the question in seconds.
Let's build one from beginning to end.
What Is a PivotTable?
A PivotTable takes a list of data and summarises it without changing the original records.
Microsoft describes PivotTables as tools for calculating, summarising and analysing data so you can identify comparisons, patterns and trends.
They can quickly answer questions such as:
- Which salesperson generated the most revenue?
- Which product sells the most?
- What were our sales by month?
- Which region performed best?
- How many orders did we receive?
- What was the average order value?
The important thing is that the underlying data remains intact.
You are simply changing how Excel summarises and presents it.
Our Example
Imagine this is your sales data:
| Date | Salesperson | Region | Product | Quantity | Revenue |
|---|---|---|---|---|---|
| 3 Jan | Amy | North | Laptop | 2 | £1,600 |
| 5 Jan | Ben | South | Monitor | 4 | £800 |
| 12 Jan | Amy | North | Monitor | 3 | £600 |
| 18 Jan | Chloe | East | Laptop | 1 | £800 |
| 2 Feb | Ben | South | Laptop | 2 | £1,600 |
| 7 Feb | Chloe | East | Monitor | 5 | £1,000 |
| 15 Feb | Amy | North | Keyboard | 6 | £300 |
| 21 Feb | Ben | South | Keyboard | 8 | £400 |
| 4 Mar | Chloe | East | Laptop | 3 | £2,400 |
| 10 Mar | Amy | North | Monitor | 2 | £400 |
| 16 Mar | Ben | South | Monitor | 6 | £1,200 |
| 24 Mar | Chloe | East | Keyboard | 5 | £250 |
Twelve rows are easy enough to read manually.
But imagine:
12,000 rows.
Management asks:
How much revenue did each salesperson generate from each product?
That is exactly the sort of question a PivotTable is designed to answer.
The Result We Want
Our finished report should look like this:
| Salesperson | Keyboard | Laptop | Monitor | Grand Total |
|---|---|---|---|---|
| Amy | £300 | £1,600 | £1,000 | £2,900 |
| Ben | £400 | £1,600 | £2,000 | £4,000 |
| Chloe | £250 | £3,200 | £1,000 | £4,450 |
| Grand Total | £950 | £6,400 | £4,000 | £11,350 |
Immediately we can see:
Chloe generated the most revenue.
Laptops generated the most revenue.
Ben generated the most monitor revenue.
Keyboard revenue was considerably lower than laptop and monitor revenue.
And we did not need to write a single formula.
Step 1: Get the Source Data Right
PivotTables work best when the underlying data is structured properly.
Microsoft recommends organising source data in columns with a single header row.
Think of the data as a database table.
Every column represents one property:
Date | Salesperson | Region | Product | Quantity | Revenue
And every row represents one transaction.
Avoid layouts like:
January Sales
blank row
February Sales
subtotal
March Sales
Those might look attractive on a printed report, but they are poor source data.
Keep the raw data boring.
That makes the reporting powerful.
Use Proper Column Headings
Every column needs one clear heading.
Good:
Date
Salesperson
Product
Revenue
Bad:
Info
Stuff
Total 1
Details
The field names become the controls you use when building the PivotTable, so meaningful headings make everything easier.
Keep Data Types Consistent
A Revenue column should contain numbers.
Do not mix:
1600
£800
N/A
Eight hundred
If Excel interprets some values as text, you may later find that your PivotTable displays:
Count of Revenue
instead of:
Sum of Revenue
That is usually a source-data problem rather than a PivotTable problem.
Step 2: Turn the Data Into an Excel Table
This isn't essential, but I strongly recommend it.
Click anywhere in the source data and press:
Ctrl + T
Confirm:
My table has headers
Then give the table a useful name such as:
SalesData
Why bother?
An Excel Table makes the dataset easier to manage and, importantly, makes adding future rows much cleaner.
Instead of building a PivotTable against something like:
A1:F500
you can build it against:
SalesData
As your sales table grows, the source is much easier to maintain.
Step 3: Create the PivotTable
Click anywhere inside SalesData.
Go to:
Insert > PivotTable
Choose:
New Worksheet
Then select:
OK
Microsoft's current Excel versions follow this same basic process.
Excel creates an empty PivotTable.
You should also see the PivotTable Fields panel.
This is where PivotTables suddenly become much easier to understand.
The Four Areas You Need to Understand
You will normally see four boxes:
Rows
Columns
Values
Filters
Forget everything else for a moment.
If you understand those four boxes, you understand the basic idea behind PivotTables.
Rows = What Goes Down the Left?
Our question is:
How much revenue did each salesperson generate from each product?
We want salespeople listed vertically.
Drag:
Salesperson
into:
Rows
Excel displays:
Amy
Ben
Chloe
That's Rows understood.
Columns = What Goes Across the Top?
We want each product across the top.
Drag:
Product
into:
Columns
Excel now displays headings for:
Keyboard
Laptop
Monitor
That's Columns understood.
Values = What Number Should Excel Calculate?
We want:
Revenue
Drag:
Revenue
into:
Values
Excel should select:
Sum of Revenue
because Revenue contains numbers.
Excel now calculates every combination automatically.
Amy + Laptop.
Amy + Monitor.
Ben + Laptop.
Chloe + Keyboard.
And so on.
Microsoft's current guidance follows this same pattern: non-numeric fields typically go into Rows, date/time fields can go into Columns, and numeric fields commonly go into Values.
Filters = Optional Control Over the Whole Report
We also have:
Region
Drag Region into:
Filters
You can now filter the entire report by region.
For example:
All
or:
North
or:
South
or:
East
For this tiny dataset it isn't particularly exciting because each salesperson belongs to one region.
With thousands of transactions across multiple territories, it becomes much more useful.
That's the Whole PivotTable
Our configuration is simply:
| Area | Field |
|---|---|
| Rows | Salesperson |
| Columns | Product |
| Values | Sum of Revenue |
| Filters | Region — optional |
That is the concept people often think is complicated.
You are really just telling Excel:
Group by this → split by this → calculate this.
In our case:
Group by salesperson → split by product → add revenue.
Now Pivot It
This is where the name starts making sense.
Move:
Product
from Columns to Rows.
Then move:
Salesperson
from Rows to Columns.
You have not changed the original sales data.
You have simply changed your view of it.
You could instead create:
Region → Salesperson → Revenue
or:
Product → Salesperson → Quantity
or:
Month → Product → Revenue
The dataset remains the same.
The question changes.
Why Does Excel Say “Count of Revenue”?
This is one of the most common PivotTable problems.
You drag Revenue into Values expecting:
Sum of Revenue
but Excel gives you:
Count of Revenue
First check the underlying Revenue column.
It may contain:
- numbers stored as text
- spaces
N/A- empty strings from formulas
- currency entered as text
Clean the source data.
Then refresh the PivotTable.
You can also open:
Value Field Settings
and change:
Count
to:
Sum
but if the source column contains bad data, fix that rather than merely hiding the symptom.
Format the Revenue Properly
Don't manually format random cells in the finished PivotTable.
Right-click a revenue value and choose:
Value Field Settings > Number Format
Select:
Currency or Accounting
and choose:
£
This attaches the number formatting to the PivotTable field rather than relying on individually formatted cells.
Sum Is Not Your Only Option
Click:
Value Field Settings
and you can change the calculation.
For Revenue, you might use:
Sum
to answer:
How much revenue did we generate?
Or:
Average
to answer:
What was the average transaction revenue?
Or:
Count
to answer:
How many transactions were there?
Or:
Max
to answer:
What was the largest transaction?
Same data.
Different question.
You Can Show Percentages Too
Suppose management doesn't want pounds.
They ask:
What percentage of total revenue did each salesperson generate?
You don't need to rewrite the source data.
Use:
Show Values As
and select an appropriate percentage calculation, such as:
% of Grand Total
Our totals are:
- Amy — £2,900
- Ben — £4,000
- Chloe — £4,450
- Total — £11,350
So approximately:
| Salesperson | Share of Revenue |
|---|---|
| Amy | 25.6% |
| Ben | 35.2% |
| Chloe | 39.2% |
Same source.
Another business question answered.
Dates Become Much More Powerful
Suppose our source data contains two years of transactions.
Instead of displaying hundreds of individual dates, PivotTables can group dates into useful reporting periods such as:
- month
- quarter
- year
You could therefore create:
Rows: Product
Columns: Month
Values: Sum of Revenue
and immediately produce a monthly product-sales report.
This is one of the reasons PivotTables are so useful for management reporting.
Don't Forget to Refresh
This catches beginners constantly.
You add another 500 transactions to the source table.
Then look at the PivotTable.
The numbers haven't changed.
A PivotTable may need to be refreshed after its source data changes.
Right-click inside it and choose:
Refresh
or use:
PivotTable Analyze > Refresh
Microsoft also provides Refresh All when a workbook contains multiple PivotTables or data connections.
Newer Microsoft 365 versions are also gaining automatic refresh for PivotTables based on local workbook data, although behaviour can depend on the workbook and Excel build.
So don't assume:
new source row = instantly updated PivotTable
unless you've confirmed automatic refresh is active.
Why I Recommend an Excel Table as the Source
Imagine your original source is:
A1:F100
Tomorrow you add transactions in rows:
101:150
If the PivotTable's source remains fixed at:
A1:F100
those new records are outside its range.
Using an Excel Table as the source avoids much of this housekeeping because the table expands as new rows are added.
You still need to make sure the PivotTable has refreshed.
Slicers Make PivotTables Easier for Other People
Filters are useful.
Slicers are often easier for non-technical users.
A slicer provides clickable buttons for categories such as:
North
South
East
or:
Laptop
Monitor
Keyboard
That can turn a basic PivotTable into a simple interactive management report without anybody learning formulas.
PivotCharts Use the Same Idea
Once your PivotTable works, you can create a:
PivotChart
For our example, a column chart could compare:
- Amy
- Ben
- Chloe
by total revenue.
Change the PivotTable filter and the chart follows.
That can be useful for:
- management reports
- sales meetings
- monthly reviews
- dashboards
But build the underlying PivotTable correctly first.
A beautiful chart based on bad source data is still a bad report.
What About Recommended PivotTables?
If you don't know where to begin, current Excel can suggest a layout.
Select your data and use:
Insert > Recommended PivotTables
Excel analyses the dataset and proposes useful summaries. Microsoft specifically recommends this as a quick way to start exploring data.
This can be helpful for learning.
But I would still understand:
Rows + Columns + Values + Filters
because once those four concepts make sense, you can build exactly the report you want instead of relying on Excel to guess.
What About Copilot?
Current versions of Excel can also use Copilot to help create PivotTables where the appropriate Microsoft 365 licensing and features are available.
That's useful.
But Copilot doesn't make the underlying principles irrelevant.
You still need to understand whether:
- the source data is clean
- Excel is summing the correct field
- filters are hiding records
- totals make sense
- the report answers the intended question
AI can build a report.
You still need to know whether the report is correct.
PivotTables Can Go Far Beyond One Table
For ordinary business spreadsheets, one clean Excel Table is often enough.
But PivotTables can also analyse:
- several related tables
- external databases
- Power Query results
- Excel's Data Model
- Power BI datasets
Microsoft currently supports building PivotTables from multiple related tables through Excel's Data Model.
For example, instead of one giant worksheet you might have:
Customers
Orders
Products
Salespeople
with relationships between them.
That's where PivotTables start moving from everyday spreadsheet reporting towards proper business intelligence.
But you do not need to understand any of that to build your first one.
The Biggest PivotTable Mistakes
Most problems come back to a few things:
- Poor source data — blank headings, merged cells, mixed data types.
- Wrong calculation — Count instead of Sum.
- Wrong field placement — a field is in Columns when it belongs in Rows.
- Numbers stored as text.
- Forgetting to refresh.
- A source range that doesn't include new rows.
- Filtering data and forgetting the filter is active.
- Manually editing PivotTable results instead of correcting the source.
If a PivotTable produces a strange result, check those before rebuilding everything.
PivotTable or Formula?
Use a PivotTable when you want to:
- explore data
- summarise thousands of records
- compare categories
- rearrange a report quickly
- group dates
- drill into totals
Use formulas such as SUMIFS, COUNTIFS and XLOOKUP when you need:
- calculations embedded into a fixed report layout
- values used elsewhere in formulas
- highly controlled output
- calculations on individual rows
Neither is universally better.
They solve different problems.
The One Sentence to Remember
If PivotTables still seem complicated, remember this:
Rows tell Excel what to group, Columns tell it how to split those groups, and Values tell it what to calculate.
For our example:
Rows: Salesperson
Columns: Product
Values: Revenue
And that turns a list of transactions into a useful business report.
Once you understand that, the intimidating-looking PivotTable panel becomes much easier.
How Hamilton Group Can Help
Excel is often one of the most heavily used—and underused—business applications in Microsoft 365.
Hamilton Group can help businesses with:
- Microsoft 365
- Excel
- Microsoft Teams
- SharePoint
- OneDrive
- Microsoft licensing
- user support
- productivity improvements
- IT training and consultancy
Sometimes improving productivity does not require buying another piece of software.
It simply means getting more value from the software the business already pays for.
Visit hgmssp.com or call 01423 438 953 to discuss Microsoft 365 and business IT support.
0 comments
- Be the first to comment.