InfluxDB v2.7.1
Grafana 10.0.1
I want to create bar graph monthly energy.
from(bucket: “IDA”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r._measurement == “Electric” and r._field == “P” )
|> aggregateWindow(every: 1mo, fn: sum, createEmpty: true)
|> drop(columns: [“host”, “topic”])
|> cumulativeSum()
My data is Active Power, P (kW).
P is send every 1 minute.
I want to convert P to Energy (kWh) and show on the graph.
Example graph that I want to get it
Another question, how can I offset -7h?
I try to use this “option location = timezone.fixed(offset: -7h)”
from this https://docs.influxdata.com/flux/v0.x/stdlib/timezone/fixed/
but I cannot offset it.