Documentation

cumulativeSum() function

Flux 0.7.0+

The cumulativeSum() function computes a running sum for non-null records in the table. The output table schema will be the same as the input table.

Output data type: Float

cumulativeSum(columns: ["_value"])

Parameters

columns

A list of columns on which to operate. Defaults to ["_value"].

tables

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

Examples

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

import "sampledata"

sampledata.string()
  |> cumulativeSum()

View input and output


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.