Introduction

A calculation can be used to operate on existing timeseries data and store the output as new separate time series data. In essence, a calculation is a script that runs against the incoming time series data stream, i.e. a measurement. If an input measurement receives a new value, the calculation script runs and the ouptut is stored as a separate measurement (= the name of the calculation).

Input measurements

A calculation can run against one or more input measurements. When there is more than one input measurement, the calculation will execute the script whenever all the input measurements have new unprocessed data available.

Calculation types

  • A raw calculation has one input measurement and runs for each value of this underlying input measurement ( raw mode ).
  • A sampled calculation can use the aggregated values of multiple input measurements and returns one value for each indicated time interval ( sampled mode ).
  • A simulated calculation has no input measurements and returns a simulated value for each indicated time interval ( simulation mode ).

Creating a calculation

Creating a calculation is similar as creating a measurement .

Calculation example

  1. Configure the basic measurement properties
  2. Choose a calculation type
  3. Specify the calculation settings, which depend on the calculation type:
  4. Setup the calculation script
An input measurement is given an alias, which need to be referenced in the script (here _A) instead of the measurement name.

Calculation lifecycle

A calculation has a paused and an active state.

Paused

When clicking the pause button on an active calculation, the calculation will stop it’s operation until it is resumed.
Thus, A paused calculation will not ouptut any new timeseries data.

Active

To resume the calculation click the same button, which is now indicating Resume instead of Pause. When resuming a calculation, time series data will be processed from the time at which you hit the resume button. Consequently, during the paused state, no new time series data for this time period will have been processed!

Recalculation of time series data

A calculation can be recalculated over a historic time period. For historic time series data or missing time series data (when calculation was paused), one is able to recalculate using a given time period. To recalculate time series data for a particular calculation:

  1. Press recalculate on a selected calculation
  2. Indicate a time period (manually or by using the datepicker) and submit.

Calculation recalculate