The group data group type is one of the collection of data manipulation types: filter, group, merged, pivot and relative.
A group data group takes the rows from another data group (its “base”) and groups by a field in the base data group (note: you cannot base a data group on a data manipulation data group).
For example, if the base data group has the following contents:
FirstName | Surname |
Jane | Smith |
John | Smith |
George | Brown |
Jean | Brown |
John | Jones |
A group data group grouped on the Surname field would result in a data group with the following contents:
Surname |
Smith |
Brown |
Jones |
The new data group includes on row for each different value found in the Surname field of its base.
The base data group is not sorted in advance of grouping so in fact what’s happening is that a row is included for every change of Surname. This can give unexpected results if grouping on a field that is not the primary sort field of the base.
Because the new data group includes the first row for each change of surname the actual contents would be:
FirstName | Surname |
Jane | Smith |
George | Brown |
John | Jones |