AL1AS
AL1AS

Reputation: 1

Custom grafana $timeFilter

I'm using this query to fetch data for current day power consumption in order to display in a bar chart.

SELECT mean("value") 
FROM "Dataset" 
WHERE "measurement" = 'Ea+' 
  AND time >= '2024-11-18T22:00:00Z'
  AND time <= '2024-11-19T22:00:00Z'
GROUP BY time(1h) 
FILL(null)

The problem is I didn't find any other way to get the result wanted without using exact timestamps... Is there any way I can get some sort of variable like $timeFilter which would fetch the right values for current day?

Upvotes: 0

Views: 42

Answers (0)

Related Questions