Sub topic 6
Choosing row and column fields
This chapter assumes you can already insert a PivotTable from a flat dataset and open the PivotTable Fields pane. You should also know that the Rows, Columns, Values and Filters areas exist. Here you decide which fields go on which axis, and why.
What row and column fields do
A row field lists its unique values down the left side of the PivotTable. A column field lists its unique values across the top. Values fill the grid where the two meet. Each cell holds the summary of every source record that matches both its row item and its column item.
Use this sample data, saved as a table with one header row:
Date,Region,Product,Units,Sales
2025-01-05,East,Widget,10,250
2025-01-12,West,Gadget,4,180
2025-02-03,East,Gadget,7,315
2025-02-14,West,Widget,12,300
2025-03-09,East,Widget,5,125Place the fields like this:
Rows: Region
Columns: Product
Values: Sum of SalesThe result is a grid of total sales for each region and product combination. East and Widget gives 375 (250 + 125). West and Gadget gives 180.
Deciding which field goes where
Both layouts show the same numbers. The choice affects how easy the table is to read. Use these rules:
- Put the field with more unique items in Rows. A long list scrolls down easily. A wide list forces horizontal scrolling.
- Put the field with few items, such as 2 to 6 categories, in Columns. These make compact headings you can compare at a glance.
- Put dates in Rows when you want a time series. Put them in Columns only when there are a few periods.
- Keep the field you want to compare across categories next to each other, so the eye moves along one row or one column.
Using more than one field in an area
You can drag several fields into one area. Their order sets the nesting.
- Drag Region into Rows.
- Drag Product into Rows below Region.
- Read the result: each region lists its products beneath it, with a subtotal for the region.
Reversing the order lists each product with its regions beneath it. Drag a field up or down in the area list to change the order, or drag it to another area to move it.
You can also drag a field out of the pane's area, or clear its check box in the field list, to remove it. The source data is not changed.
Common errors
- Putting a numeric field such as Units into Rows. Excel lists every distinct number as a row label instead of summarising it. Put measures in Values.
- Putting a field with a unique value per record, such as an order ID, in Rows or Columns. The table has one row per record and summarises nothing.
- Putting too many fields in Columns. The grid becomes very wide and hard to scan.
Exercise
Using the sample data, you want to compare three regions across 24 monthly periods. Which field goes in Rows and which in Columns, and why?
Show answer
Put the 24 months in Rows and the three regions in Columns. The long list of months scrolls down, and three region columns stay compact and easy to compare side by side.