Variable Data Sources - But they are queries

Hi everyone, I’m using Grafana v6.2.5 (not cloud), and trying to set up an option to be able to dynamically change the data source for the dashboard.

This isn’t too difficult, however I don’t actually control my companies data sources, and we utilize queries for all their data. E.g we have variables as queries for our sources ($event, $proxy, $central) each with a query inside them. I can create a dashboard with three duplicated sets of panels, and run a single show tag query on each data source query itself, to show panel data, but I am trying to make it a single adjustable query for the data source.

I would like to have a dashboard variable which allows this, but I’m a little confused, I checked the documentation for Chained Variables but I’m lost. To visualize what I’m trying to do I attached a screenshot

that is an ancient version of grafana and dashboard templating has undergone almost constant development in the years since. I would check out these new online example dashboards running Grafana 9: