Hey,
i’m calculating one data point within an rolling time span. I want to create a horizontal line based on this one data point. Do you know a possibility to achive this?
I’m using influx 1.8 and Grafana 7.5
My query looks like this:
Select sum(“tag2”)/(sum(“tag1”)+sum(“tag3”)+sum(“tag4”))
from
(
SELECT sum(“value_float”::float)/60/1000 as “tag1” FROM “Example” WHERE (“Generic_Name” = ‘datastream1’) AND time > now()-365d GROUP BY time(1h) fill(none)
),(
SELECT sum(“value_float”::float)/60/1000 as “tag3” FROM “Example” WHERE (“Generic_Name” = ‘datastream2’) AND time > now()-365d GROUP BY time(1h) fill(none)
),(
SELECT sum(“value_float”::float)/60/1000 as tag4 FROM “Example” WHERE (“Generic_Name” = ‘datastream3’) AND time > now()-365d GROUP BY time(1h) fill(none)
),(
SELECT sum(“value_int”::float) as “tag2” FROM “Example” WHERE (“Generic_Name” = ‘datastream4’) AND time > now()-365d GROUP BY time(1h) fill(none)
)
WHERE time > now()-365d GROUP BY time(1h) fill(previous)
Thank you in advance for your help