How to add drop down filter for all panels where the data is getting collected from different table from postgres

Hello GrafanaPros,

I am newbie in grafana and need help regarding filtering the dataset which is being collected from multiple tables in postgres.(All tables are linked with primary key and hence there is a relationship among them).

“device by facility” and “device by device_type” are collected from different table whereas the “status of device” and “active and inactive” are from same table.(so there are three table each linked with id).

I want to have a dropdown filter where once i apply filter like facility=“mumbai” all the panels should get changed and i should get the data for only mumbai facility.

Thank You

welcome to the :grafana: forum, @pawanyadav

It sounds like you want to use chained variables. Here are some useful starting points and example dashboards in our public sandbox :+1:

Here are the docs on template variables. And here is a list of good examples on play.grafana.org that use template variables. You can inspect each dashboard to see just how the variables are constructed.