6
Learning Objective Two - Group data
Grouping PivotTable items is a handy feature that enables you to group specific items in a field. A group
field provides a higher level of summary detail than that provided by the original source data. For
example, companies can be grouped into regional areas, numbers grouped into ranges and dates
grouped into months or quarters.
In the row and column label areas of a PivotTable report, you can group the items in a field in a custom
way. Grouping the data can help you to isolate a subset of data that satisfies your specific needs and
that cannot be grouped in other ways such as sorting and filtering.
When you group items by selection you create a new field based on the field whose items you are
grouping. For example if you group the SalesPerson field by specific names, you create a new field
SalesPerson1, which is added to the PivotTable Field List.
You can work with this new field in many ways for example; move it to different areas of the PivotTable
report, rearrange it with other fields in an area, rename the field by using the Field Settings dialog box,
and filter the field it is based on by using the new group name and values. However please note that
you cannot add a calculated item to a grouped field. You must first ungroup the items, add the
calculated item and then regroup the items.
Rows and columns of data in a PivotTable can easily be grouped and it is also possible to group non-
adjacent field items in a row or column.
To group data within a field, select either adjacent or non-adjacent data by holding the <Ctrl> key and
clicking on non-adjacent data or holding the <Shift> key down to select adjacent data. Select PivotTable
Analyse->Group->Group Selection.
To Do: ….
Grouping is quite important to understand and use when working with PivotTables. There are
many different ways in which you can group data in a PivotTable. Using the PivotTable created in the
workbook Transactions.xlsx, you will now have some practise at using grouping by doing the following;
Group Selected Items;
• Select two or more items in the PivotTable report that you want to group, either by clicking and
dragging or by holding down CTRL or SHIFT while you click
• Select PivotTable Analyse->Group->Group Selection; give that selection you’ve just grouped a
name
• Repeat this process to group other sections
Group by Date/times;
• Date or time field in the PivotTable report that you want to group
• Select PivotTable Analyse->Group->Group Field
• Enter the first date or time to group in the Starting at box and enter the last date or time to
group in the Ending at box.
• In the By box, click one or more time periods for the groups (to group items by days in the By
box make sure that Days is the only time period selected and then click 7 in the Number of days
box. You can then click additional time periods to group by such as month.)
Group by Numerical items;
• Select the numeric field in the PivotTable Report that you want to group
• Select PivotTable Analyse->Group->Group Field
• In the Starting at box enter the first item to group
• In the Ending at box enter the last item to group
• In the By box, type a number that represents the interval included in each group