Skip to content

Aggregate data by time

Description

The Aggregate Data by Time activity enables you to group and summarize records based on a time-based column, such as order date, timestamp, or transaction date. You can define the aggregation period (e.g., month, year, week, day) and apply aggregation functions like sum, average, and count on numerical columns.

Use this activity to:

  • Group rows into periods such as months or weeks.
  • Summarize numerical data by time ranges.
  • Retain or exclude original columns from the output.
  • Decide how text values are handled when grouped by time.

Use case: After importing a sales dataset, this activity can be used to generate monthly sales summaries, average unit sales per week, or total transactions per year.

Input

Input TypeRequiredDescription
DataRequiredTabular input data with text or numeric columns to concatenate

Output

Output TypeFormatDescription
DataJSONAggregated dataset by time period

Configuration Fields

Field NameDescription
Time ColumnThe column containing time/date values used for grouping.
PeriodDefines the time interval to group by. Options: year, month, week, day.
AggregationsList of column-to-aggregation mappings.
  • Column Name – Column to aggregate
  • Aggregation Typesum, average, count
Include OriginalToggle to retain the original input data columns. If disabled, only aggregated columns are returned.
Text StrategySpecifies how text fields are handled in grouped data. Options:
  • First – Use first value
  • Last – Use last value

Sample Input

Order DateSalesUnits SoldTransactionsProduct Name
2024-01-10500101Product A
2024-01-15700121Product B
2024-02-0530051Product A
2024-02-25900151Product C

Sample Configuration

FieldValue
Time ColumnOrder Date
PeriodMonth
Aggregations
  • Sales → sum
  • Units Sold → average
  • Transactions → count
Include Originalfalse
Text StrategyFirst

Sample Output

MonthTotal SalesAvg Units SoldTransaction CountFirst Product
2024-01-01T00:00:001200112Product A
2024-02-01T00:00:001200102Product A