# Dashboard Variable with Multiple Filters

**URL:** <https://community.dynatrace.com/t/dashboard-variable-with-multiple-filters/45958>\
**Category:** DQL\
**Tags:** dashboards\
**Created:** [June 6, 2024, 5:10pm UTC](https://community.dynatrace.com/t/dashboard-variable-with-multiple-filters/45958 "2024-06-06T17:10:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwinkler109](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@cwinkler109](https://community.dynatrace.com/u/cwinkler109)\
**Post date:** [June 6, 2024, 5:10pm UTC](https://community.dynatrace.com/t/dashboard-variable-with-multiple-filters/45958/1 "2024-06-06T17:10:12Z")

</div>

I built a dashboard that surfaces website traffic patterns from info in our log events. Is it possible to configure a dashboard variable to filter the dashboard panels for either of these three categories of traffic: Real User traffic,&nbsp; Bot traffic, or Test Traffic?

**Base DQL:**

```markup
fetch logs
| filter log.source=="my_source"

```

Here are the query filters for each of these traffic types:

- **Real User traffic** : | filter not contains(content,“bot”) and not contains(request,“-test”)
- **Bot traffic** : | filter contains(content,“bot”)
- **Test traffic** : | filter contains(request,“-test”)

It’s not clear to me how to approach this. Thanks for any advice.

---

<div class="post-metadata">

**Author:** ![krzysztof\_hoja](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/krzysztof_hoja/32/34625_2.png) [@krzysztof\_hoja](https://community.dynatrace.com/u/krzysztof_hoja)\
**Post date:** [June 10, 2024, 6:19pm UTC](https://community.dynatrace.com/t/dashboard-variable-with-multiple-filters/45958/2 "2024-06-10T18:19:53Z")

</div>

Let’s define filter this way:

 ![krzysztof_hoja_0-1718043317823.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/9/e950d718dae91e495fe2349333388dc481df5bb2.png)

and create DQL query so combines conditionally all filters:

```markup
fetch logs
| filter 
($Traffic=="Test" and contains(request,"-test") ) or
($Traffic=="Bot" and contains(content,"bot") ) or
($Traffic=="Real" and not contains(content,"bot") and not contains(request,"-test"))
| fields content
| limit 10

```

Depending on variable value only one condition will be active. Other 2 are are false, but they do not do any harm as are always _ **false** _.

Kris
