Computes the sum of all values found in all row values in a column. Input column can be of Integer or Decimal.
- If a row contains a missing or null value, it is not factored into the calculation. If no numeric values are found in the source column, the function returns
- When used in an
aggregatetransform, the function is computed for each instance of the value specified in the
groupparameter. See Aggregate Transform.
aggregate value:SUM(myRating) group:postal_code
Output: Generates a two-column column containing the unique values of the
postal_code column and the sum of the group of values from the
myRating column for the
aggregate value:SUM(function_col_ref) [group:group_col_ref]
|function_col_ref||Y||string||Name of column to which to apply the function|
For more information on the
group parameter, see Aggregate Transform.
For more information on syntax standards, see Language Documentation Syntax Notes.
Name of the column the values of which you want to calculate the sum. Column must contain Integer or Decimal values.
- Literal values are not supported as inputs.
- Multiple columns and wildcards are not supported.
|Required?||Data Type||Example Value|
|Yes||String (column reference)|
You have the following set of orders for two months, and you are interested in identifying the set of colors that have been sold for each product for each month and the total quantity of product sold for each month.
To track by month, you need a column containing the month value extracted from the date:
You can aggregate the data in your dataset, grouped by the reformatted
set col:Date value:DATEFORMAT(Date, 'MMM yyyy')
Datevalues, and apply the
LISTfunction to the
Colorcolumn. In the same aggregation, you can include a summation function for the
aggregate value: LIST(Color, 1000) SUM(Qty) group: Date
If needed, you can unpack the list array data using the following: