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.
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()
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.