Skip to content
Docs

System Variables

System Variables are automatically created and managed by StatStream to store values generated by system calculations, aggregations, and automation features.

Unlike user-created variables, System Variables do not require manual configuration. Whenever StatStream performs a calculation or automation task, the resulting value is stored in a System Variable, making it available for dashboards, reports, alerts, analytics, and other system features.


Whenever a supported system feature generates a calculated value, StatStream checks whether the corresponding System Variable already exists.

  • If the variable exists, its value is updated.
  • If the variable does not exist, it is created automatically before storing the calculated value.

This ensures that calculation results are always available without requiring manual setup.


System Variables are automatically generated for the following features:

  • Shift Combined Aggregation
  • Shift Time-of-Use (TOU) Combined
  • Discrete Aggregation
  • Action outputs
  • Other system-generated calculations

Shift Combined Aggregation stores the final aggregated value for an entire production shift.

The System Variable name is generated using the shift name and the configured aggregation suffix.

SYS_<SHIFT_NAME>_<SUFFIX>
ConfigurationValue
Shift NameMORNING_SHIFT
Aggregation SuffixAVG
Generated System VariableSYS_MORNING_SHIFT_AVG

At the end of the shift, StatStream calculates the aggregated value and stores it in the generated System Variable.

Common aggregation suffixes include:

  • AVG
  • SUM
  • MIN
  • MAX
  • COUNT

The suffix depends on the aggregation configured for the calculation.


Shift TOU Combined stores the total electricity cost accumulated during a production shift.

When a shift is completed, StatStream calculates the combined energy charge and stores the result in a System Variable.

SYS_<SHIFT_NAME>_CHARGE_<SUFFIX>
ConfigurationValue
Shift NameNIGHT_SHIFT
SuffixCOMBINED
Generated System VariableSYS_NIGHT_SHIFT_CHARGE_COMBINED

The generated variable can be used like any other variable throughout StatStream, including dashboards, reports, alerts, and analytics.


Discrete Aggregation creates a System Variable for the aggregated value of an existing variable.

The generated variable name combines the original variable name with the configured aggregation suffix.

SYS_<VARIABLE_NAME>_<SUFFIX>
Source VariableAggregationGenerated System Variable
CURRENTAVGSYS_CURRENT_AVG
VOLTAGEAVGSYS_VOLTAGE_AVG
POWERAVGSYS_POWER_AVG

System Variables provide a consistent way to store and reuse automatically generated values across StatStream.

Key benefits include:

  • Automatic creation and maintenance by the system.
  • Consistent naming conventions.
  • No manual configuration required.
  • Available for dashboards, reports, alerts, analytics, AI recommendations, and additional calculations.
  • Behave like standard variables and can be referenced throughout the platform.