# Variable table select/Multiple variable select

**URL:** <https://community.grafana.com/t/variable-table-select-multiple-variable-select/11622>\
**Category:** Grafana\
**Created:** [October 29, 2018, 4:41pm UTC](https://community.grafana.com/t/variable-table-select-multiple-variable-select/11622 "2018-10-29T16:41:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noskills](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@noskills](https://community.grafana.com/u/noskills)\
**Post date:** [October 29, 2018, 4:41pm UTC](https://community.grafana.com/t/variable-table-select-multiple-variable-select/11622/1 "2018-10-29T16:41:00Z")

</div>

Weird query, I’m sure I’m doing it wrong. I have a complicated dashboard with multiple data sources that I need to query simultaneously for each customer. Right now I have a template that I create a dashboard for each customer that that means I need to update each of there is a change. What I would prefer is to have one dashboard and a drop down for my customer. What I need is a way to pick one customer from the dropdown and that would update a bunch of variables. Like a table of them for each customer. These can’t be dynamically generated as some are numbers and don’t contain the customer name. Any thoughts on how to create a table of variables?

---

<div class="post-metadata">

**Author:** ![noskills](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@noskills](https://community.grafana.com/u/noskills)\
**Post date:** [November 8, 2018, 5:32pm UTC](https://community.grafana.com/t/variable-table-select-multiple-variable-select/11622/2 "2018-11-08T17:32:13Z")

</div>

I came up with an idea but I can’t seem to implement it. Basically I build a table of variables.  
$customer = one,two  
$one\_host = host1  
$two\_host = host2  
$one\_url = url1  
$two\_url = url2  
$host = $customer\_host  
$url = $customer\_url

This doesn’t seem to work as you can’t extrapolate the $customer\_host variable inside the $host variable.

This solution would allow me to create a table of variables for each customer and then only have one mutli-value to select and then get different strings out of it. Anyone have a better way of doing this? My issue is I’m selecting against different data sources with different strings required for each customer.

---

<div class="post-metadata">

**Author:** ![noskills84](https://avatars.discourse-cdn.com/v4/letter/n/82dd89/32.png) [@noskills84](https://community.grafana.com/u/noskills84)\
**Post date:** [March 14, 2019, 4:20pm UTC](https://community.grafana.com/t/variable-table-select-multiple-variable-select/11622/3 "2019-03-14T16:20:01Z")

</div>

My solution was to create a Database in AWS RDS to map these things. We ended up using it for a bunch of stuff and call it the GrafanaHelper Database. It allows us to do a one to many mapping for anything we need. The only problem is you can’t use variables and alerts at the same time.  
So for the above specific issue I have a query that looks for all the unique “Customer” names in the database and then I can use the columns for each customer row to map out all the other variables.

As you can see I have URLs that are used by Graylog and ES datasources and ELB identifiers for cloudwatch datasources. Now my end users only need to select a customer name and it gets them all the details.  
 ![image](https://us1.discourse-cdn.com/grafana/original/2X/5/5eb346d8943e5d51924d5c635304c3d615074032.png)
