<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dashboard Variable with Multiple Filters in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Dashboard-Variable-with-Multiple-Filters/m-p/247895#M963</link>
    <description>&lt;P&gt;Let's define filter this way:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1718043317823.png" style="width: 456px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20436i99C5614520AAED8D/image-dimensions/456x337?v=v2" width="456" height="337" role="button" title="krzysztof_hoja_0-1718043317823.png" alt="krzysztof_hoja_0-1718043317823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and create DQL query so combines conditionally all filters:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;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 &lt;EM&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2024 18:19:53 GMT</pubDate>
    <dc:creator>krzysztof_hoja</dc:creator>
    <dc:date>2024-06-10T18:19:53Z</dc:date>
    <item>
      <title>Dashboard Variable with Multiple Filters</title>
      <link>https://community.dynatrace.com/t5/DQL/Dashboard-Variable-with-Multiple-Filters/m-p/247586#M955</link>
      <description>&lt;P&gt;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,&amp;nbsp; Bot traffic, or Test Traffic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Base DQL:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
|  filter log.source=="my_source"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the query filters for each of these traffic types:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Real User traffic&lt;/STRONG&gt;: | filter not contains(content,"bot") and not contains(request,"-test")&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Bot traffic&lt;/STRONG&gt;: | filter contains(content,"bot")&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Test traffic&lt;/STRONG&gt;: | filter contains(request,"-test")&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not clear to me how to approach this. Thanks for any advice.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 18:55:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Dashboard-Variable-with-Multiple-Filters/m-p/247586#M955</guid>
      <dc:creator>cwinkler109</dc:creator>
      <dc:date>2024-06-06T18:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard Variable with Multiple Filters</title>
      <link>https://community.dynatrace.com/t5/DQL/Dashboard-Variable-with-Multiple-Filters/m-p/247895#M963</link>
      <description>&lt;P&gt;Let's define filter this way:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1718043317823.png" style="width: 456px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20436i99C5614520AAED8D/image-dimensions/456x337?v=v2" width="456" height="337" role="button" title="krzysztof_hoja_0-1718043317823.png" alt="krzysztof_hoja_0-1718043317823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and create DQL query so combines conditionally all filters:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;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 &lt;EM&gt;&lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 18:19:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Dashboard-Variable-with-Multiple-Filters/m-p/247895#M963</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-06-10T18:19:53Z</dc:date>
    </item>
  </channel>
</rss>

