The Time Series Data Service offers several options for processing incoming values. It is important to note that the calculations must be adjusted in each widget.
Show simple calculation with a static value
Show multiple metric calculation
Show cumulative sum calculation
How can I calculate my incoming values with a static value (multiply, divide, sum, subtract)?
With the “Math” function in the Time Series Data Service, static values can be easily inserted into queries for calculation.
- Open the widget in which you want to use a static value for the calculation
- In the query view, navigate to the “SELECT” line and click on the “+” at the end of the line
- Select the “math” option here under “math”
- A function is now added to the “SELECT” line. You can use simple calculations here.
How can I use two or more incoming metrics to create a new metric (e.g. multiply, divide, sum, subtract)?
With the “Transform” function in the Time Series Data Service, different metrics can be calculated together to create a new metric for a widget. Please note, that the transform option is not available for all visualization options.
- Open the widget in which you want to calculate a new metric
- Switch to the “Transform” tab
- Select the “Add field from calculation” transformation
- Decide if you want to calculate based on a predefined option (Total, mean, max, min …) or simply select “Binary option”
- Select the queries you want to use and the calculation option
- Rename the new metric and optionally hide the “source metrics”
How can I add up the values of a day?
With the “cumulative_sum” function within a query, all values in a period can be added up to calculate a total value for this period.
- Open the widget in which you want to calculate the cumulative sum of a specific timerange
- In the query view, navigate to the “SELECT” line and click on the “+” at the end of the line
- Select the “cumulative_sum” option here under “Transformation”
- Change the timerange to the specific time range you need