Skip to content

Aggregate data by column

Description

The Aggregate Data By Column activity allows you to group and summarize data based on one or more column values. You can apply aggregation functions such as sum, average, and count to selected columns. This is useful for generating summaries, totals, or grouped reports from tabular data.

Use this activity to:

  • Group data by one or more key columns.
  • Apply aggregation functions like sum, average, or count.
  • Retain or discard original columns as needed.
  • Manage how text columns are handled during aggregation.

Use case: After importing transactional data, you can use this activity to calculate total sales per category, count of orders, or average unit price grouped by product or region.

Input

Input TypeRequired
DataRequired

Output

Output TypeFormatDescription
DataJSONAggregated dataset as per config

Configuration Fields

Field NameDescription
Group By ColumnOne or more columns used to group the data.
AggregationsList of columns and their corresponding aggregation functions.
  • Column – Name of the column to aggregate
  • Aggregation Typesum, average, or count
Include OriginalToggle to retain original input columns in the output. If disabled, only grouped and aggregated columns are returned.
Text Column StrategyDefines how to handle text fields during aggregation. Options:
  • First – Retains the first text value in each group
  • Last – Retains the last text value

Sample Input

CategoryTotal SalesUnits SoldProduct Name
Electronics5000050Laptop
Electronics5000050Phone
Furniture6000040Sofa
Electronics5000050Laptop
Clothing2000030T-Shirt
Clothing2000030Ethnix
Furniture6000040Bed
Clothing4000030Pants

Sample Configuration

FieldValue
Group By ColumnCategory
Aggregations
  • Total Sales → sum
  • Units Sold → first
Include Originalfalse
Text Column StrategyFirst

Sample Output

CategoryTotal SalesUnits SoldProduct Name
Electronics15000050Laptop
Clothing8000030T-Shirt
Furniture12000040Sofa