6.3.1 Grouping and Aggregating Data
To define grouping and aggregation columns (summary columns) for a Data table, follow these steps:

1. Press the 'Group and Aggregate' button in the table's title bar. This opens the 'Aggregate' dialog box.
2. Select the grouping columns by clicking the 'Group' check box next to one or more column names.
When you enable grouping for a column, by default each distinct value in the column defines its own group. Aggregation is then based on these groups. For example, if you group a column of state names, each distinct state name will define its own group, and aggregate values will be computed for each of those groups.
3. (Optional) If a user-defined group matches the grouping column data format (String, Double, etc.), you can select the user-defined group from the right-side menu.

User-defined groups give you greater flexibility in partitioning the entries in a column for grouping. If you select a user-defined grouping from the menu, aggregations will be based on that user-defined grouping.
4. (Optional) If you specify grouping for a column that has a Date format, you can select a predefined or user-defined Date grouping (Year, Quarter, etc.) from the right-side menu.

The actual date values in the grouping column will be replaced with the new group labels, e.g., '1st Quarter', 'January', etc.
5. Click the 'Aggregate' check box for columns containing the measures that you wish to aggregate (summarize).
6. For the aggregate columns, choose the method of aggregation (Sum, Correlation, etc.).
7. (Optional) For the univariate aggregation methods (Sum, Max, etc.), select the 'Percentage' check box to display the aggregated measure as a percentage of the grand total.
8. (Optional) For the bivariate aggregation methods (Correlation, etc.), select the second operand (column) for the computation from the 'with' menu.
9. Click 'OK' to close the 'Aggregate' dialog box.
The table is now grouped. Only the table columns that are either grouping columns or aggregate columns are shown in the grouped table. All other columns are hidden. In the grouped table, each column has an icon indicating whether it is a grouping column or an aggregate column. Click any of these icons to reopen the 'Aggregate' dialog box.

See Also
Creating a Named Grouping, for more information on user-defined groupings.
Appendix C.2, Built-in Date Groupings, for a list of predefined date groupings.
Crosstab Aggregation Measures, for more details about aggregation methods.
Switching Between Detail and Aggregate View, to revert back to ungrouped table.
Creating a Numeric Range Column, to create a new grouping of existing column.
Assume you have order information for several companies and are interested in seeing how much revenue was generated by each of the individual products sold. To do this, group the table data by 'Product' and summarize by 'Total'. Follow the steps below:

1. Create a new Worksheet.
2. Expand the 'Data Source' node, and the 'Orders' node.
3. Drag the 'Order details' query on to an empty cell in the Worksheet. This creates a new table named 'Order details1'.
4. Press the 'Group and Aggregate' button in the table title bar.

This opens the 'Aggregate' dialog box.
5. Select 'Group' for the 'Product' column and 'Aggregate' for the 'Total' column.
6. Set the aggregate function for the 'Total' column to 'Sum'.

7. Click on the 'OK' button to apply the grouping and summarization.
8. Preview the table. Notice that only the 'Product' and 'Total' fields are included in the table and the columns not included in the grouping or aggregation have been removed.

| << 6.3 Grouping | © 1996-2013 InetSoft Technology Corporation (v11.5) | 6.3.2 Defining a Crosstab Table >> |