Pivot Tables and Charts
Lesson opener
In one line: A pivot table does not change your data.
Why it matters: This shows up at work when you need to summarize hundreds of rows without formulas - the same idea behind Power BI matrix visuals..
Before this lesson: Lookups
If you have been through xl1-xl4, you already know more Excel than most people in most offices.
Before you start
| Resource | Link |
|---|---|
| Previous | Lookups |
| Next | What-if analysis |
What you will learn
Summarize hundreds of rows without formulas — the same idea behind Power BI matrix visuals.
What a pivot table actually is
A pivot table does not change your data. It reads your data and builds a summary on a separate area of the sheet.
Think of it as asking Excel a question: "Show me total sales, grouped by region, for each month" — without writing a single formula.
Your original data stays untouched.
Setup — Sales table with segment
You need a Sales table with a segment column (from xl5 XLOOKUP, or typed by hand for practice).
Columns: order_id, customer_id, segment, channel, month, revenue.
Turn the range into a table: click any cell → Ctrl+T.
Tutorial 1 — Create pivot table
- Click anywhere inside your Sales table.
- Click Insert → PivotTable → put it on a new sheet.
- Drag segment to Rows.
- Drag revenue to Values (Sum).
- Drag order_id to Values again → right-click → Value Field Settings → Count.
You now see total revenue and order count for each segment.
Tutorial 2 — Add slicers
Slicers are big filter buttons. They let a manager click Mobile or Jan without touching the raw data.
- Click inside the pivot table.
- Click PivotTable Analyze → Insert Slicer.
- Check channel and month → OK.
- Click a slicer button — the pivot updates instantly.
If you have two pivots on one sheet, right-click a slicer → Report Connections → tick both pivots.
Tutorial 3 — Pivot chart
A pivot chart is a chart tied to the pivot. Filter the pivot — the chart follows.
- Click inside the pivot table.
- Click Insert → PivotChart → Clustered column.
- Drag month to Axis (or Rows).
- Drag segment to Legend.
- Keep revenue as the value.
To show a trend line instead: right-click the chart → Change Chart Type → pick Line.
Tutorial 4 — Show values as
Right-click any number in the pivot → Show Values As.
| Option | Use |
|---|---|
| % of grand total | Share by segment |
| Running total | Cumulative revenue |
| Difference from | Month-over-month change |
Example: right-click a revenue total → Show Values As → % of Grand Total. Gold might show 42% of all revenue.
Values area — aggregation and drill-down
When you drag a field to Values, Excel defaults to Sum for numbers and Count for text. Change it anytime:
- Click the field in Values → Value Field Settings.
- Pick Sum, Average, Count, Max, etc.
- Use Show Values As on the same menu for % of parent, running total, or rank.
Drill-down: Double-click any pivot total cell — Excel creates a new sheet listing the source rows behind that number. Use this to audit a surprising total before you email leadership.
Multiple metrics: Drag revenue twice — set one to Sum and one to Average order size. Rename fields in Value Field Settings so the pivot header reads clearly (Total Revenue, Avg Revenue).
Tutorial 5 — Refresh pivot data
Your pivot reads from a table on another sheet. When you add rows to that table, the pivot does not update until you refresh.
Plain English: Refresh tells Excel to re-read the source table and rebuild the summary — like clicking "update" on a report that pulls from a live export.
Steps:
- Add new rows to your Sales table (e.g. two more orders for April).
- Click anywhere inside the pivot table.
- Press Alt+F5, or PivotTable Analyze → Refresh, or right-click the pivot → Refresh.
If refresh shows old numbers:
- Confirm new rows are inside the table (the table border expanded when you typed on the next blank row).
- If you pasted below the table, click the table → Table Design → Resize Table to include the new rows, then refresh again.
Try it yourself: Add one row to Sales, refresh the pivot, and confirm the segment total increases.
Business example
Question: Which channel drives Platinum segment revenue in Q1?
- Add a slicer or filter: segment = Platinum.
- Filter month to Jan, Feb, Mar.
- Put channel in Rows.
- Put revenue in Values (Sum).
Read the biggest number — that channel wins Q1 for Platinum.
Essential commands
| Command / action | What it does |
|---|---|
Insert → PivotTable | Build a drag-and-drop summary from a table. |
PivotTable Analyze → Insert Slicer | Add clickable filter buttons. |
Insert → PivotChart | Chart that updates when the pivot changes. |
Right-click value → Show Values As | Show %, running total, or difference. |
Alt+F5 or PivotTable Analyze → Refresh | Re-read source table after new rows are added. |
Practice — no download needed
Open a blank Excel sheet. Follow these steps exactly:
Step 1: Type this table starting at A1:
| order_id | customer_id | segment | channel | month | revenue |
|---|---|---|---|---|---|
| O001 | C01 | Gold | Web | Jan | 1200 |
| O002 | C02 | Silver | Mobile | Jan | 400 |
| O003 | C01 | Gold | Mobile | Feb | 800 |
| O004 | C03 | Platinum | Web | Feb | 2500 |
| O005 | C02 | Silver | Web | Mar | 350 |
Select A1:F6 → press Ctrl+T → name the table Sales.
Step 2: Click any cell in Sales → Insert → PivotTable → new sheet.
Drag segment to Rows, revenue to Values (Sum), month to Columns.
Step 3: What do you see?
You should see a grid: segments as rows, months as columns, revenue totals in the cells.
Gold Jan should show 1200. If you see blanks: check that revenue is a number, not text.
Step 4: On the pivot sheet, click PivotTable Analyze → Insert Slicer → add channel.
Click Mobile — only Mobile orders stay in the totals.
Challenge (optional): Add Insert → PivotChart (column). Change one value to % of Grand Total. Which segment is the largest share?
Checklist
- [ ] Can you explain what a pivot table does without saying "it pivots data"?
- [ ] Can you build a summary of revenue by segment and month without writing a formula?
- [ ] Can you add a slicer and watch the pivot filter when you click a channel?
- [ ] Can you attach a pivot chart that updates when the pivot changes?
- [ ] Can you show revenue as % of grand total for a quick share view?
- [ ] Can you refresh the pivot after adding rows to the source table?