I am looking for a way to sum up the values of a column in my database in order to get a curve as a function of time.
Here is my Flux code generated by InfluxDB:
from(bucket: "Bucket") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "VMs") |> filter(fn: (r) => r["Host"] == "10.59.10.21") |> filter(fn: (r) => r["_field"] == "vmWeight") |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false) |> yield(name: "mean")
And I would like to have a single curve that adds up all the “vmHeight” values at each point. example
I tried with the “group” function of Flux but it does not work.