# Use variable on the query of a new varaible

**URL:** <https://community.dynatrace.com/t/use-variable-on-the-query-of-a-new-varaible/41559>\
**Category:** Dashboarding\
**Tags:** dynatrace-managed, dashboards\
**Created:** [September 7, 2023, 2:22pm UTC](https://community.dynatrace.com/t/use-variable-on-the-query-of-a-new-varaible/41559 "2023-09-07T14:22:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikeies](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Mikeies](https://community.dynatrace.com/u/Mikeies)\
**Post date:** [September 7, 2023, 2:22pm UTC](https://community.dynatrace.com/t/use-variable-on-the-query-of-a-new-varaible/41559/1 "2023-09-07T14:22:25Z")

</div>

Hello everyone,

I create a first variable on my Dashboard. I created it in CSV and it has the values ​​INT and PROD.

These values ​​each represent a dt.host\_group.id

I create a new variable. For this one, I want all hosts in the dt.host\_group.id selected on the first variable.

Is it possible ?

---

<div class="post-metadata">

**Author:** ![izabelarokita](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/izabelarokita/32/41812_2.png) [@izabelarokita](https://community.dynatrace.com/u/izabelarokita)\
**Post date:** [December 13, 2023, 12:13pm UTC](https://community.dynatrace.com/t/use-variable-on-the-query-of-a-new-varaible/41559/2 "2023-12-13T12:13:39Z")

</div>

Hello&nbsp;[@Mikeies](https://community.dynatrace.com/user/66662)&nbsp;,  
have you found the answer to your questions already? Let me know because if not, I’ll look for someone to help. And if yes - would you like to share the answer with the Community? 😉

---

<div class="post-metadata">

**Author:** ![gbaudart](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Post date:** [December 15, 2023, 8:52am UTC](https://community.dynatrace.com/t/use-variable-on-the-query-of-a-new-varaible/41559/3 "2023-12-15T08:52:45Z")

</div>

Hi&nbsp;[@Mikeies](https://community.dynatrace.com/user/66662),

It’s possible with the “new” Dashboard and DQL request/Code.

If you create a CSV variable, you can specify any value you want there.  
Example :

 ![gbaudart_0-1702630167151.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d7dacfaef2a2cb234a5204ff80607794cb1f2658.png)

Then, it is within the different “tiles” that the different possibilities should be indicated with “if” and different queries per condition.
