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"])



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


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

Output tables

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


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

import "sampledata"
  |> increase()

View input and output

Function definition

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

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.