Range filtering in Grafana

I want to filter a data set with in a range. As an example there is a table which contain the details of students. As a user Is there a way to filter students who are born with in a certain period of time according to their birth year by using dashboard ?

THANK YOU!!

Welcome

Short answer: you should be able to but

what os are you running this in?
what version of grafana?
what is your data source?
what visualization are you using?

I am running this on windows and the version v9.0.2. I am using postgreSQL as my data source with table visualization.

1 Like

Do you have any idea, how to filter those data set according to my requirement ?

1 Like

The best starting point is to first create such SQL query in Postgres console and then once you get such result, could simply use it inside Grafana to create such dashboard.

Steps are not clear. could you please explain more ?

Sure let me take a look now that we are awake on this side of the world

1 Like

try this. It will use the time range selector provided by grafana.

SELECT
  birthdate AS "time",
  first_name
FROM students
WHERE extract(epoch from birthdate) between ${__from:date:seconds} 
and ${__to:date:seconds}
ORDER BY 1

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.