Sub topic 1
What Grouping Does and Where to Find It
Prerequisites
This chapter assumes that you can create a PivotTable, place fields in Rows, Columns, and Values, and use Sum or Count. Your source data should have one header row and a contiguous range or Excel table.
What Grouping Does and Where to Find It
Grouping combines individual PivotTable items into larger categories. For example, daily order dates can become months, quarters, or years. Sales amounts can become ranges such as 0–99, 100–199, and 200–299.
To group an item:
- Place the field in the PivotTable's Rows or Columns area.
- Select an item in that field.
- Right-click and choose Group. You can also use PivotTable Analyze > Group > Group Selection.
- Set the options in the Grouping dialog, then select OK.
Why Dates and Numbers Can Be Grouped
Excel stores a real date as a serial number: the whole-number portion represents a day, and the fractional portion can represent a time. Because dates have this numeric structure, Excel can calculate their month, quarter, or year.
Numbers can also be ordered and divided into equal-width ranges. Text does not have this numeric structure, so Excel cannot automatically create time or numeric ranges from it.
A quick check can reveal whether a date is a real date or text:
=ISNUMBER(A2)TRUE indicates that A2 contains a number or real date. FALSE often indicates text that must be converted before grouping.
Grouping Dates by Months, Quarters, and Years
Select a date item and open Group. In the dialog, select Months, Quarters, Years, or a combination. Then select OK. Excel adds grouped fields to the PivotTable. For example, selecting all three creates a hierarchy of Year, Quarter, and Month.
Selecting Several Units at Once
Select multiple units when you need several levels for analysis. Years + Quarters + Months lets you expand a year into quarters and then months. Selecting only Months compares January values across years, so include Years when the year matters.
Exercise
How do you group a PivotTable date field into years, quarters, and months?
Show answer
Select a date item, choose Group, select Years, Quarters, and Months, then select OK.