Learn Without Walls
← Module 04: Working with Data 🏠 Course Home Module 06: Charts & Visualization →
Module 05 of 08  |  Excel & Google Sheets for Data

📊 Pivot Tables

Pivot tables are one of the most powerful features in any spreadsheet. They turn hundreds of rows of raw data into a clean, interactive summary — without writing a single formula. This module shows you exactly how.

⏰ ~40 minutes 🎓 Intermediate 📋 Requires: Modules 01–04
📌 Before You Start
Use the Module 04 sales dataset

Open the 20-row sales spreadsheet from Module 04 (or re-enter it). Pivot tables work best with clean, structured data — consistent headers, no merged cells, no blank rows in the middle. Your Module 04 dataset is already in good shape.

You'll also build a 30-row extended dataset below for the main exercise.

💡 The Concept
What is a Pivot Table?

Imagine you have 500 rows of sales data — Date, Region, Category, Revenue. A pivot table lets you instantly answer questions like:

Without a pivot table, you'd write multiple SUMIF and COUNTIF formulas — one per combination you want to analyze. With a pivot table, you drag-and-drop fields and the summary builds itself in seconds.

The four pivot table zones:

↓ ROWS

The categories you want to group by vertically. Each unique value becomes a row. Example: one row per Region.

→ COLUMNS

A second grouping across the top. Each unique value becomes a column. Example: one column per Category.

✍ VALUES

The numbers to summarize. You choose: SUM, COUNT, AVERAGE, etc. Example: SUM of Revenue.

🔍 FILTERS

An optional filter applied to the whole pivot table. Example: show only Q1 data.

📋 Sample Data — 30-Row Sales Dataset
Create a new sheet with this data for the pivot exercises
DateRegionCategoryRevenue
2024-01-05NorthElectronics1200
2024-01-08SouthBooks350
2024-01-12EastClothing445
2024-01-15WestElectronics1350
2024-01-20NorthElectronics960
2024-02-03SouthBooks540
2024-02-07EastElectronics750
2024-02-14WestClothing660
2024-02-18NorthBooks245
2024-02-25SouthElectronics450
2024-03-01EastElectronics790
2024-03-05WestClothing400
2024-03-10NorthElectronics388
2024-03-15SouthClothing270
2024-03-20EastBooks280
2024-03-25WestElectronics360
2024-04-02NorthClothing320
2024-04-08SouthElectronics1500
2024-04-14EastBooks525
2024-04-20WestElectronics600
2024-05-03NorthElectronics880
2024-05-08SouthClothing390
2024-05-14EastElectronics720
2024-05-20WestBooks175
2024-05-25NorthBooks210
2024-06-01SouthElectronics1100
2024-06-07EastClothing330
2024-06-14WestElectronics970
2024-06-20NorthClothing440
2024-06-25SouthBooks295
🔧 Step-by-Step
Creating Your First Pivot Table in Google Sheets
  1. Click any cell inside your data table (e.g., A1).
  2. Go to Insert → Pivot table. A dialog appears asking where to put the pivot table.
  3. Choose "New sheet" — this keeps your raw data clean and your pivot table on a separate sheet. Click Create.
  4. A blank pivot table appears on the new sheet, with a Pivot table editor panel on the right side.
  5. In the editor, click "Add" next to Rows and select Region. You'll now see North, South, East, West as row labels.
  6. Click "Add" next to Values and select Revenue. Choose "Summarize by: SUM". Your pivot table now shows total revenue per region.
  7. To add a second dimension, click "Add" next to Columns and select Category. Now you see revenue broken down by both Region AND Category in a cross-tab.

What you should see:

Pivot Table: SUM of Revenue by Region × Category

RegionBooksClothingElectronicsGrand Total
East80577522603840
North45576034284643
South118566034005245
West175106022803515
Grand Total262032551136817243
🔧 Step-by-Step
Grouping Dates: Summarize by Month or Quarter

When you add a Date field to Rows, you'll see individual dates — not very useful. You can group them by month, quarter, or year.

  1. In the Pivot table editor, remove Region from Rows. Add Date to Rows instead.
  2. In the Rows section of the editor, you'll see an option to "Group by" — set it to Month (or Quarter, Year).
  3. Now your pivot shows total revenue per month — a time series summary.
  4. In Excel: right-click any date cell in the pivot table → Group → select Months, Quarters, Years. Check multiple boxes for nested grouping (e.g., by Year then Month).
💡 The Concept
Slicers: Interactive Filtering Buttons

Slicers are visual filter buttons that sit on your sheet. Instead of using the pivot table's built-in filter dropdown, slicers let you click a button to instantly filter the pivot. They make your spreadsheet feel interactive — like a basic dashboard.

  1. Click anywhere inside your pivot table.
  2. Go to Data → Add a slicer.
  3. In the slicer panel, choose the column to filter by — for example, Category.
  4. A slicer widget appears on your sheet showing buttons for Electronics, Books, and Clothing.
  5. Click "Electronics" — the pivot table instantly filters to show only Electronics data. Click again to deselect.
  6. You can have multiple slicers on the same sheet. Add one for Region too.
Excel note: In Excel, slicers work the same way — click the pivot table, then Insert → Slicer, choose the fields you want. Excel slicers have more styling options (colors and sizes).
🔧 Step-by-Step
Changing Summarization: COUNT, AVERAGE, and Custom

By default, the Values area uses SUM. But you can change it:

  1. In the Pivot table editor, click on "Revenue" in the Values section.
  2. Change "Summarize by" from SUM to COUNT — now you see how many transactions per region/category, not total revenue.
  3. Change it to AVERAGE — now you see the average revenue per transaction.
  4. You can add the same field multiple times with different summarizations. Add Revenue twice: once as SUM, once as COUNT. Now you can see both totals and transaction counts side by side.
🖐 Your Turn
Exercise: Revenue by Region and Category

Using the 30-row dataset above:

  1. Create a pivot table on a new sheet showing Revenue by Region (Rows = Region, Values = SUM of Revenue). Which region has the highest total revenue?
  2. Add Category to Columns to see a breakdown by both Region and Category. Which Region-Category combination has the highest revenue?
  3. Add a slicer for Region. Click "North" — what's the total revenue for the North region alone?
  4. Create a second pivot table on a new sheet with: Rows = Date (grouped by Month), Values = SUM of Revenue. What month had the highest revenue?
  5. In the second pivot table, change the Values summarization from SUM to COUNT. What does this tell you? (How many transactions happened per month.)
Hint: To create a second pivot table, click inside your original data, then Insert → Pivot table again. This creates another pivot on a new sheet, independent of the first one.
🧠 Brain Break
The Origin of "Pivot"

The word "pivot" in pivot table comes from the idea of rotating your data — taking what was in rows and moving it to columns, or vice versa. The original concept was developed at Lotus Development in the late 1980s and brought to Excel by Pito Salas in 1994. The "Pivot Table" feature in Excel 5.0 was considered so innovative that it's cited as one of the reasons Excel surpassed Lotus 1-2-3 in market share.

Google Sheets added pivot tables in 2011. Today, analysts use them to summarize millions of rows in seconds — a task that would take hours with manual formulas.

✅ Wrap Up
Module 05 Key Takeaways

Next: Module 06 — Charts & Visualization →