Skip to content

Aggregate Column

Type: aggregate-column  ·  Package: DataTable Activities v1.0.5  ·  Output: number

Computes a summary value over a DataTable column: the sum, the count, the average, the minimum or the maximum. It is the direct way to get totals and metrics from a data set — the total to collect, the number of records, the average of an indicator.

Applies the given operation to the values of the column and returns a number.

  • sum, avg, min and max take every cell that can be converted to a number (with a dot as decimal separator, 1500.50). Empty or non-numeric cells are skipped without error and do not count toward the average.
  • count returns the number of rows in the table, without looking at the column content (empty cells are counted too).
  • If no cell is numeric (or the table has no rows), sum, avg, min and max return 0.
ParameterTypeDefaultDescription
tableDataTable—The DataTable.
columnstring—Name of the column to aggregate.
operationstring—Operation: sum · count (row count) · avg (average) · min (minimum) · max (maximum).

None.

Returns a number (double) with the result. count is also returned as a number (12 → 12.0); use toInt(...) if you need an integer.

MessageCause and fix
'table' must be a DataTable.table does not evaluate to a DataTable.
'column' is required.The column name is missing.
Column '…' does not belong to table ….The column does not exist in the table (.NET message). Check the exact name.
Unsupported operation '…'. Use: sum, count, avg, min, max.operation is not one of the valid values.

Total and average of sales:

Aggregate Column table = sales column = "Amount" operation = sum → output: total
Aggregate Column table = sales column = "Amount" operation = avg → output: average
Log message = "Total: " + total + " · Average: " + round(average, 2)
  • Group By — aggregates per group instead of a single global one.
  • Filter DataTable — narrow down the rows before aggregating.
  • Get Column — get all the column values as a list.