How to have each panel work off a "global" query? Whats best practice?

Is there a way, maybe through dashboard query variables, or stored procedures to have the panels on my dashboard work off the same query data rather than each requesting similar things from the server?

I’m thinking I should be able to use a dashboard query variable to pull a snippet of a table, then rather than each panel querying the datasource itself, work off that snippet in memory.

For instance, if I set up a dashboard query to execute on time frame change thats something to the effect of


Can I then get a panel to work off that resulting returned table? Something like


I’ve tried different flavors of syntax and nothing is working, I’ve also heard that the query variable is limited in how much data it can handle. I’ve tried my best google-foo to answer the question but haven’t found anything yet.

Am I barking up the wrong tree? What is best practice? I feel like I’m doing it wrong by having each panel query the same data, I’d like to learn and do it right/optimized.

Thank you in advance.

If your ad-hoc data that you are planning to use from the results of your “global” query can be obtained by simple transformations of the “global” data, then I recommend checking out the – Dashboard – data source for the panels that use that ad-hoc data.