Skip to content
Docs

Aggregation Actions

Aggregation Actions compute a derived value — such as a sum, average, minimum, or maximum — from one or more tagged variables, and save the result as a new or existing variable. Use these to roll up raw data-points into shift totals, daily summaries, or Time-of-Use (TOU) figures.

Aggregation Actions can be associated with Alert / Action Rules or Schedule Actions, or attached directly to a shift, so the aggregation runs automatically without manual calculation.

StatStream supports the following aggregation types:

Aggregation ActionDescription
Combined AggregationAggregates tagged variables over a custom hours/days window into a single target variable.
Discrete AggregationAggregates tagged variables over a custom hours/days window, creating a new variable for the result.
Shift-Combined AggregationAggregates tagged variables over a shift period.
Shift-Discrete AggregationAggregates tagged variables over a shift period, writing each result to a separate variable.
Shift-TOU DiscreteRuns a discrete-style aggregation aligned to Time-of-Use periods.
Shift-TOU CombinedRuns a combined-style aggregation aligned to Time-of-Use periods.

Each aggregation action has its own configuration fields, detailed below.

The Combined Aggregation action aggregates one or more tagged variables over a custom time window (hours or days) and writes the result into a single, existing variable.

Combined Aggregation Action
FieldDescription
NameSpecifies the name of the action.
DescriptionProvides a brief description of the action.
Select TagsChoose one or more tags for aggregation.
Time Range TypeChoose whether the aggregation should consider previous hours or previous days.
Enter Hours/DaysSpecifies the number of hours or days to aggregate over.
AggregationSelect how the data-points should be aggregated (e.g., Sum, Average, Min, Max, Count).
Time AdjustmentThe number of seconds to adjust the time by (±30 seconds).
Target VariableSelect the existing variable in which the aggregated result will be saved.

The Discrete Aggregation action aggregates one or more tagged variables over a custom time window (hours or days), creating a new variable to hold the result.

Discrete Aggregation Action
FieldDescription
NameSpecifies the name of the action.
DescriptionProvides a brief description of the action.
Select TagsChoose one or more tags for aggregation.
Time Range TypeChoose whether the aggregation should consider previous hours or previous days.
Enter Hours/DaysSpecifies the number of hours or days to aggregate over.
AggregationSelect how the data-points should be aggregated (e.g., Sum, Average, Min, Max, Count).
Time AdjustmentThe number of seconds to adjust the time by (0–30 seconds).
Variable SuffixSuffix appended to the variable created to store the result.
  • Unlike Combined Aggregation, Discrete Aggregation creates a new variable rather than saving into an existing one.

The Shift-Combined Aggregation action aggregates one or more tagged variables over a shift period rather than a fixed hours/days window.

Shift-Combined Aggregation Action
FieldDescription
NameSpecifies the name of the action.
DescriptionProvides a brief description of the action.
Select TagsChoose one or more tags for aggregation.
AggregationSelect how the data-points should be aggregated.
Variable SuffixSuffix appended to the variable created to store the result.
  • This action must be attached to one or more shifts to run.

The Shift-Discrete Aggregation action aggregates one or more tagged variables over a shift period, writing each result to a separate aggregated variable.

Shift-Discrete Aggregation Action
FieldDescription
NameSpecifies the name of the action.
DescriptionProvides a brief description of the action.
Select TagsChoose one or more tags for aggregation.
AggregationSelect how the data-points should be aggregated.
Variable SuffixSuffix appended to the variable created to store each result.
  1. Select one or more tags to identify the variables to aggregate.
  2. Choose an aggregation function.
  3. Provide a variable suffix.
  4. Attach the action to one or more shifts.
  5. At the end of each shift, StatStream computes the aggregation.
  6. Each result is written to a separate aggregated variable.

The Shift-TOU Discrete action runs at shift end, producing a discrete-style aggregation result.

Shift-TOU Discrete Action
FieldDescription
NameSpecifies the name of the action.
DescriptionProvides a brief description of the action.
Variable SuffixSuffix appended to the variable created to store the result.
  • Configuration is based on the configured Time-of-Use tariff settings.

The Shift-TOU Combined action runs at shift end, producing a combined-style aggregation result.

Shift-TOU Combined Action
FieldDescription
NameSpecifies the name of the action.
DescriptionProvides a brief description of the action.
Variable SuffixSuffix appended to the variable created to store the result.
  • Configuration is based on the configured Time-of-Use tariff settings.

Aggregation Actions can be used to:

  • Compute shift-wise production counts, energy consumption, or quality metrics.
  • Roll up hourly or daily totals for reporting.
  • Feed Time-of-Use tariff calculations with aggregated energy data.
  • Create derived variables for use in dashboards, reports, or further alert rules.