Aggregating values
Aggregates supports aggregating, or grouping, values in a data field. You can aggregate values from one field in any table. For example, create an aggregate using the Count function in the Order field of the Customer table to see how many orders each customer placed.
How to create an aggregate
1 In Enrichment—Engineering, choose Aggregates.
2 From My Data, drag the name of the table where you will create an aggregate, and drop it in Create a new Aggregate based on, as shown in Figure 3‑9.
Figure 3‑9 Assigning a table as a basis for an aggregate
3 In Name for new Aggregate, type the name of the new, aggregate field.
4 From My Data, drag the column that contains values to be aggregated, and drop it in Origin column, as shown in Figure 3‑10.
Figure 3‑10 Assigning a table as a basis for an aggregate
5 In Function, select one of the following aggregate functions:
*Average
*Count
*First
*Last
*Maximum value
*Mean (integer)
*Mean (real)
*Minimum value
*Quadratic sum
*Standard deviation
*Sum
6 Choose Create.
7 In My Data, review the new aggregate to verify your selections.
For example, to aggregate orders placed by Customers in London, select Count in Function, drag Order No. from Customers and drop Order No. in the Origin column.
How to aggregate totals for a specific group
1 In Enrichment—Engineering, choose Aggregates.
2 From My Data, drag a table on which to base the new aggregate, and drop it in Aggregates, as shown in Figure 3‑11.
3 In Name for new Aggregate, type the name of the new, aggregate field.
4 In Aggregate properties—Function, select a function appropriate to aggregate values.
5 From My Data, drag a column that contains values to be aggregated, and drop it in Origin column, as shown in Figure 3‑11.
Figure 3‑11 Defining properties for an aggregate
6 To create a filter that defines a specific group to be aggregated, double‑click a column in My Data. From Discrete Values, drag a segment, and drop it in Filter (optional), as shown in Figure 3‑12.
Figure 3‑12 Adding a filter to an aggregate
7 Choose Create.
8 In My Data, double‑click the newly created aggregate to view the results. Calculated values appear in Discrete Values, as shown in Figure 3‑13.
Figure 3‑13 Viewing values in an aggregate