# Is it possible to show/hide query based on template variable?

**URL:** <https://community.grafana.com/t/is-it-possible-to-show-hide-query-based-on-template-variable/2251>\
**Category:** Grafana\
**Tags:** templating\
**Created:** [August 14, 2017, 6:12am UTC](https://community.grafana.com/t/is-it-possible-to-show-hide-query-based-on-template-variable/2251 "2017-08-14T06:12:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomeleven](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@randomeleven](https://community.grafana.com/u/randomeleven)\
**Post date:** [August 14, 2017, 6:12am UTC](https://community.grafana.com/t/is-it-possible-to-show-hide-query-based-on-template-variable/2251/1 "2017-08-14T06:12:16Z")

</div>

I am using grafana with influxdb, and I want to show/hide queries in a graph panel based on user’s choice from a dropdown menu, which is a template variable with custom values:  
 ![image](https://us1.discourse-cdn.com/grafana/original/2X/4/4e0cb71cac8bd734c59ffb1ebd306e28ef383ef4.png)

I tried something like this:

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/b/b77965ffbfaed5fe079c57f56a3ba8c4e2c31bb4.png)

but it didn’t work, I suspect it’s because the variable in this case is not part of tags in influxdb.

Is there a better way to hide queries based on custom variable?

Thanks

---

<div class="post-metadata">

**Author:** ![torkel](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/torkel/32/20_2.png) [@torkel](https://community.grafana.com/u/torkel)\
**Post date:** [August 14, 2017, 9:40am UTC](https://community.grafana.com/t/is-it-possible-to-show-hide-query-based-on-template-variable/2251/2 "2017-08-14T09:40:29Z")

</div>

no this is not currently possible.

---

<div class="post-metadata">

**Author:** ![randomeleven](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@randomeleven](https://community.grafana.com/u/randomeleven)\
**Post date:** [August 14, 2017, 10:18am UTC](https://community.grafana.com/t/is-it-possible-to-show-hide-query-based-on-template-variable/2251/3 "2017-08-14T10:18:49Z")

</div>

@torkel Any suggestions though on a better way to hide queries based on custom variable?  
Thanks for your response
