Hi all, still learning flux but don’t know how to achieve what I’m looking for.
This is our base query:
from(bucket: “rt-data”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “site”)
|> filter(fn: (r) => r[“point_name”] == “TotalRack_Online”)
|> group(columns: [“_measurement”], mode:“by”)
|> pivot(rowKey:[“_time”], columnKey: [“point_name”], valueColumn: “_value”)
|> rename(columns: {TotalRack_Online: “_value”})
|> aggregateWindow(every: 1h , fn: mean)
I need the _value column to actually represent “TotalRack_Online” / 42. How do I add this transformation into my Flux Query? Right now, I do the division in Grafana. Please help!
Thanks so much.