Hello,
i am new to the flux language and i am trying to create the yearly solar energy yield of a set of 5 solar inverters. For each the inverter the produced energy is calculated from its power over time using the integral function. So far this works, but finally i want to sum all of them together.
from(bucket: "mybucket")
|> range(start: 2016-07-31T08:12:27Z, stop: 2020-07-31T08:12:27Z)
|> filter(fn: (r) => r["_measurement"] =~ /^WR \d.total-dc-power$/)
|> filter(fn: (r) => r["_field"] == "value")
|> drop(columns: ["month", "year", "device", "identifier"])
|> window(every: 1y)
|> integral(unit: 1h)
The data returned looks like:
How can i finally sum all values together?
sum()
seems to be applied only once for each row but not for all rows together.