cumulativeSum() function

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.

_Function type: Transformation
Output data type: Float

cumulativeSum(columns: ["_value"])



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

Data type: Array of strings


from(bucket: "example-bucket")
  |> range(start: -5m)
  |> filter(fn: (r) =>
    r._measurement == "disk" and
    r._field == "used_percent"
  |> cumulativeSum(columns: ["_value"])

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: