Same filter for all panels in dashboard

  • What Grafana version and what operating system are you using?

  • v8.5.2 (90701be19)

  • What are you trying to achieve?
    I would like to have my entire dashboard be filtered with some custom filter I create based on some query variables.
    I have several query variables at the top of the dashboard that the user can multiselect, and in all of the panels, there is the same where-clause that is based on these variables.
    Every time I change/add a variable, I need to go to all of the panels and update the query.
    I’d like a way to create a where-clause that will interpolate the variables and be inserted to my bigquery query.

  • How are you trying to achieve it?
    I tried using custom/constant/text box but it seems like variable chaining is only supported in query variables.
    Also ad hoc filters are no use as they don’t support bigquery

  • Did you follow any online instructions? If so, what is the URL?
    Couldn’t find any. Everywhere seems to lead to no solution :frowning:

Hi atlanteh, which syntax and database are you currently using ? :slight_smile:

@grafunkel thanks for your message!
I’m using bigquery with the sql syntax (not the builder).

Hi atlanteh, i am not really into sql and grafana variables, but if i remember right you can achieve these variables if you just query over your data columns and SELECT every DISTINCT entity if i am right.

This should help with creating a grafana variable.

The other subject regarding querying your variables:

i ve found some old post regarding this. Someone has linked their variables inside their sql syntax like that:

Hope it helps

1 Like

I am using variables, the problem is that I have a dashboard with about 7 variables, that all panels use exactly the same, so every time I need to tweak the query I need to go to all panels and update the, where I prefer to have a simple variable that would hold the “where” clause with all other variables. the problem is that variable interpolation only works for query variables, not custom/text variable