Sub topic 6
Bucket Numbers into Intervals
This chapter assumes that you can create a pivot table and add fields to its Rows, Columns, Values, and Filters sections. You should also know that a pivot table summarizes source records instead of showing every record separately.
A numeric interval is a range of numbers, such as 1–5 or 6–10. In Google Sheets, a pivot group rule combines numeric values into these ranges. This is useful when individual values have too much detail. For example, you can group sales quantities into order-size bands.
Prepare a numeric source column
The column you want to group must contain numbers. A number stored as text may look correct but will not behave like a number in a pivot table.
For example, this source data has a numeric Units column:
| Date | Region | Product | Units | Revenue |
|---|---|---|---|---|
| 2026-01-05 | West | Widget | 10 | 250 |
| 2026-01-19 | East | Widget | 4 | 100 |
| 2026-02-02 | West | Gadget | 7 | 420 |
| 2026-02-23 | South | Gadget | 3 | 180 |
| 2026-03-09 | East | Gizmo | 12 | 600 |
Keep one header row, avoid merged cells, and use one record per row. Remove accidental spaces and text such as 10 units. Blank cells can create an unexpected blank group.
Create a numeric group rule
First, create a pivot table from the source range. Add Units to the Rows section. Add Revenue to Values and leave its summary method as SUM.
The pivot may initially show one row for each distinct units value. To combine those values:
- Click a numeric item in the pivot table, such as
4. - Open the context menu by right-clicking the item.
- Choose Create pivot group rule.
- In the pivot editor, choose a numeric interval rule.
- Set the interval size, such as
5. - Set a starting value if Google Sheets asks for one.
- Apply the rule.
The exact labels can vary slightly by Sheets interface. Look for a rule that groups numbers by equal-sized intervals.
With an interval of 5, values might be displayed in ranges similar to these:
| Units interval | Meaning |
|---|---|
| 1–5 | Records with 1 through 5 units |
| 6–10 | Records with 6 through 10 units |
| 11–15 | Records with 11 through 15 units |
The pivot table now has one row for each interval. Its SUM of Revenue value is the total revenue for every source row in that interval.
Choose boundaries carefully
The starting value and interval size determine the boundaries. An interval size of 10 beginning at 0 can produce groups such as 0–9, 10–19, and 20–29. A different starting value can shift the groups.
Check the lowest and highest source values before choosing the rule. If values fall below the starting point or outside the expected range, Google Sheets may create an additional group or leave an item outside the main pattern.
Use intervals that match the question:
- Use intervals of 1 when each integer has meaning.
- Use intervals of 5 or 10 for order quantities.
- Use larger intervals for prices, revenue, or durations.
- Use a manual group instead when the categories are not evenly spaced, such as
Low,Medium, andHigh.
Verify the totals
Grouping can hide individual records, so verify the result. Add the grouped revenue values and compare them with the ungrouped pivot total. They should match, except for records excluded by filters or records that belong to a blank or separate group.
You can also temporarily remove the grouping rule and compare the detailed rows. This helps detect text numbers, blank cells, and values outside the intended boundaries.
Exercise
You group a numeric Units field with an interval size of 5, but one pivot row is blank. What should you check first?
Show answer
Check the source column for blank cells and values stored as text. Correct those values, refresh the pivot table, and then verify the group boundaries.