Any have a monthly total flux query for kWh?
vs
from(bucket: “iotawatt/autogen”)
|> range(start: v.timeRangeStart)
|> filter(fn: (r) => r._measurement == “TotalPower”)
|> aggregateWindow(every: 1d, fn: (column, tables=<-) =>
tables |> integral(unit: 1d), createEmpty: false)
|> map(fn: (r) => ({ r with _value: r._value / 3600.00 / 1000.0 }))
|> keep(columns: [“_time”, “_value”])
|> sort(columns: [“_time”])
If I comment out the map the returned values are.
|_value|_time|
|825.2188704|2023-02-11T00:00:00Z|
|2509.931949|2023-02-12T00:00:00Z|
|2724.521058|2023-02-13T00:00:00Z|
|2598.48512|2023-02-14T00:00:00Z|
|2891.021487|2023-02-15T00:00:00Z|
|2735.433436|2023-02-16T00:00:00Z|
|1889.49526|2023-02-17T00:00:00Z|
|1449.853233|2023-02-17T17:00:29.78875851Z|
I figured this all out iotawatt meter shows the daily average needs to be multiplied by 24




