Basic PivotTables

Excel Fundamentals

Chapter 9 · Basic PivotTables: Summarizing Data Without Writing a Single Formula

Chapter 4 built SUM, AVERAGE, and COUNT formulas by hand, one range at a time. A PivotTable does the same underlying job — aggregating a big pile of raw data into a meaningful summary — but by dragging field names into place instead of typing a single formula. It's the fastest way to answer a question like "what were total sales by region, broken down by quarter" against a data set with thousands of rows, and to keep re-asking slightly different questions of the same data in seconds.

The Problem PivotTables Solve

Imagine a raw data set with one row per transaction — Date, Region, Product, and Sales amount — spanning a full year and thousands of rows. Answering "what was total Sales per Region" with formulas alone means writing a SUMIF for every region individually. Answering the follow-up question — "okay, now break that down by quarter too" — means rebuilding the whole thing from scratch. A PivotTable answers both, and any other combination of the same fields, by rearranging a few field names rather than rewriting formulas.

Building Your First PivotTable

Click anywhere inside your data (or, ideally, inside an Excel Table from Chapter 7 — a PivotTable built from a Table automatically includes newly added rows the next time it's refreshed). Go to Insert → PivotTable, confirm the data range, and choose to place it on a New Worksheet — this keeps the summary cleanly separated from the raw data it's built from. Excel creates an empty PivotTable and opens the PivotTable Fields pane, listing every column from your source data as a field you can drag into place.

The Four Areas: Rows, Columns, Values, Filters

Every PivotTable is built by dragging field names into four boxes, each with its own job:

AreaWhat it doesExample (using Date/Region/Product/Sales data)
RowsCreates one row per unique value, grouped verticallyDrag Region here → one row per region
ColumnsCreates one column per unique value — combine with Rows for a cross-tab gridDrag Product here too → a region-by-product grid
ValuesThe number actually being aggregated for each Row/Column combinationDrag Sales here → each cell shows that region+product's total sales
FiltersA dropdown above the whole table that narrows everything to a subset, without changing the Row/Column layoutDrag Date here → filter the whole table to just one quarter

The same four fields, rearranged across these boxes, answer completely different questions — Region in Rows with Product in Columns answers something different from Product in Rows with Date (grouped by quarter) in Columns, and both come from dragging the exact same field list into different boxes.

Changing the Aggregation

By default, a numeric field dropped into Values is summed — but clicking the field in the Values area and choosing Value Field Settings opens the same aggregation choices Chapter 4's functions offer directly: Sum, Average, Count, Max, Min, and more. A PivotTable isn't a replacement for those functions conceptually — it's applying the exact same aggregation logic, just automatically grouped by whatever fields sit in Rows and Columns, rather than requiring a separate formula per group.

Grouping Values

Right-clicking a date field already placed in Rows or Columns offers Group, letting raw daily dates collapse into Months, Quarters, or Years automatically — without a single helper column needed to extract a quarter number from a date by hand. Numeric fields can be grouped into bins the same way (e.g. grouping ages into 10-year ranges), turning a field with too many unique values to usefully group on its own into a manageable handful of categories.

Refreshing a PivotTable

A PivotTable is a snapshot, calculated once at the moment it's built or last refreshed — it does not automatically update the instant its source data changes, even if the source is an auto-expanding Excel Table. After editing, adding, or removing rows in the source data, right-click anywhere inside the PivotTable and choose Refresh (or Data → Refresh All) to bring it up to date.

Basing a PivotTable on a Table (Chapter 7) still needs a manual Refresh
An Excel Table automatically grows to include new rows the instant they're typed in — but a PivotTable built from that Table only reads the Table's CURRENT contents at the moment it's refreshed, not continuously. Adding 50 new rows to the source Table changes nothing in the PivotTable's display until Refresh is actually clicked — the auto-expansion from Chapter 7 and the manual refresh requirement here are two separate mechanisms, and it's easy to assume the first one implies the second.
A numeric-looking field stored as text defaults to Count, not Sum
If a "Sales" column was ever entered or imported as text rather than genuine numbers (a common result of pasting from some external systems), dropping it into Values does NOT default to Sum the way a real numeric field would — it defaults to Count, silently showing "how many entries" instead of "what do they add up to," with no error or warning that anything unusual happened. If a Values field unexpectedly shows Count instead of Sum, the most likely cause is that the underlying column isn't actually stored as numbers.

Hands-On Exercises

Exercise 1

A raw data set has columns Date, Region, Product, and Sales, spanning 500 rows. Describe exactly which field(s) you would drag into Rows, Columns, and Values to answer: "what was the total Sales for each Region, broken down by Product?" Describe what the resulting grid would look like.

📄 View solution
Exercise 2

Using the same data set, you build a PivotTable with Region in Rows and Sales in Values — but the Values area shows "Count of Sales" instead of "Sum of Sales," and the numbers displayed are clearly row counts, not dollar totals. What are the two most likely causes of this, and how would you fix each one?

📄 View solution
Exercise 3

A PivotTable was built last week from an Excel Table of transactions. Since then, 200 new transaction rows have been added directly below the Table, and the Table itself expanded automatically to include them. A colleague says the PivotTable "must already include the new data since the Table auto-expands." Explain whether they're correct, and what step (if any) is still needed.

📄 View solution

Chapter 9 Quick Reference

  • Rows / Columns — create one row/column per unique value of whatever field is dragged there
  • Values — the number being aggregated; defaults to Sum for real numbers, Count for text (including numeric-looking text)
  • Filters — a dropdown that narrows the whole PivotTable to a subset without changing its Row/Column layout
  • Value Field Settings switches the aggregation to Average, Count, Max, Min, and more — the same functions from Chapter 4
  • Right-click → Group collapses dates into Months/Quarters/Years, or numbers into bins
  • A PivotTable never updates on its own — always Refresh after the source data changes, even if that source is an auto-expanding Table