Hello, i have this fluxlang query this works in Flux eplorer and grafana. But to monitor my solar panels todays yield in my old system i could use in grafana as start range now/d
This command seems not to work , so how can i from this day start 00:00 intil now() calculate my yield?
data = from(bucket: "EnergieCnt")
|> range(start:-1d )
|> filter(fn: (r) => r["_measurement"] == "EnergieCnt")
|> filter(fn: (r) => r["Area"] == "Main")
|> filter(fn: (r) => r["_field"] == "Elektra")
temp_earlier_number = data |> first() |> set(key: "_field", value: "delta")
temp_later_number = data |> last() |> set(key: "_field", value: "delta")
union(tables: [ temp_earlier_number,temp_later_number])
|> difference()