Documentation

increase() function

Flux 0.71.0+

The increase() function calculates the cumulative sum of non-negative differences between subsequent values. A main use case is tracking changes in counter values which may wrap over time when they hit a threshold or are reset. In the case of a wrap/reset, we can assume that the absolute delta between two points will be at least their non-negative difference.

Output data type: Float

increase(columns: ["_value"])

Parameters

columns

Columns to use in the operation. Default is ["_value"].

tables

Input data. Default is piped-forward data (<-).

Output tables

For each input table with n rows, derivative() outputs a table with n - 1 rows.

Examples

The following example uses data provided by the sampledata package to show how increase() transforms data.

import "sampledata"

sampledata.int()
  |> increase()

View input and output

Function definition

increase = (tables=<-, column="_value") =>
  tables
    |> difference(nonNegative: true, column:column)
    |> cumulativeSum()

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.