Hello,
how can I pull out these two values and calculate them?
I would like to calculate end - beginning = sum and output this.
Thanks.
Anfang = from(bucket: "VH_Messwerte")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["topic"] == "Energie/VH/Zaehlerstand/aktuell")
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
|> first()
Ende = from(bucket: "VH_Messwerte")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["topic"] == "Energie/VH/Zaehlerstand/aktuell")
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
|> last()