<?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: Adding a filter in timeseries gives strange effect, is it a bug or is it a feature? in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278749#M2169</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/11427"&gt;@henk_stobbe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This could be caused by the default union parameter value when combining multiple timeseries :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GerardJ_0-1749106729506.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28354iDA1236E8A1F71160/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GerardJ_0-1749106729506.png" alt="GerardJ_0-1749106729506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/commands/metric-commands" target="_blank" rel="noopener"&gt;DQL Metric commands — Dynatrace Docs&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jun 2025 06:07:32 GMT</pubDate>
    <dc:creator>GerardJ</dc:creator>
    <dc:date>2025-06-06T06:07:32Z</dc:date>
    <item>
      <title>Adding a filter in timeseries gives strange effect, is it a bug or is it a feature?</title>
      <link>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278745#M2168</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;Look at below example:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeseries {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new = sum(dt.process.network.sessions.new),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{reset = sum(dt.process.network.sessions.reset), filter: dt.entity.host=="HOST-XYX"},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{timeout = sum(dt.process.network.sessions.timeout), default:0}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;by:{dt.entity.host}&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt; the filter gets places on new reset and timeout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;timeseries {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new = sum(dt.process.network.sessions.new),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{reset = sum(dt.process.network.sessions.reset), filter: dt.entity.host=="HOST-XYX"},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{timeout = sum(dt.process.network.sessions.timeout), filter: dt.entity.host=="HOST-ABC"}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;by:{dt.entity.host}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt; the filters are "and" so you get no results&lt;/P&gt;&lt;P&gt;So is DQL right or wrong?&lt;/P&gt;&lt;P&gt;KR Henk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:22:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278745#M2168</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2025-06-05T06:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a filter in timeseries gives strange effect, is it a bug or is it a feature?</title>
      <link>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278749#M2169</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/11427"&gt;@henk_stobbe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This could be caused by the default union parameter value when combining multiple timeseries :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GerardJ_0-1749106729506.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28354iDA1236E8A1F71160/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GerardJ_0-1749106729506.png" alt="GerardJ_0-1749106729506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/commands/metric-commands" target="_blank" rel="noopener"&gt;DQL Metric commands — Dynatrace Docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 06:07:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278749#M2169</guid>
      <dc:creator>GerardJ</dc:creator>
      <dc:date>2025-06-06T06:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a filter in timeseries gives strange effect, is it a bug or is it a feature?</title>
      <link>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278827#M2171</link>
      <description>&lt;P&gt;The correct syntax looks like this and every thing works even if there is no common subset between data for 2 timeseries. Please use &lt;EM&gt;&lt;STRONG&gt;filter:&lt;/STRONG&gt;&lt;/EM&gt; clause inside regular brackets (not curly).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_1-1749149782598.png" style="width: 867px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28371iC565541CEDFF390B/image-dimensions/867x239?v=v2" width="867" height="239" role="button" title="krzysztof_hoja_1-1749149782598.png" alt="krzysztof_hoja_1-1749149782598.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;re: second query. Syntax is incorrect. This query should not even execute:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1749149660315.png" style="width: 867px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28370i3267851C2ACBE0D9/image-dimensions/867x182?v=v2" width="867" height="182" role="button" title="krzysztof_hoja_0-1749149660315.png" alt="krzysztof_hoja_0-1749149660315.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 18:58:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278827#M2171</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2025-06-05T18:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a filter in timeseries gives strange effect, is it a bug or is it a feature?</title>
      <link>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278841#M2172</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This is why I like the community so much (-;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a remark, you really need to drop the BY:&lt;/P&gt;&lt;P&gt;An you can now use things like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | fieldsAdd x = arrayAvg(r1) - arrayAvg(r2)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | fieldsKeep x&lt;/P&gt;&lt;P&gt;This is what my customer liked to see. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KR Henk&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 21:20:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278841#M2172</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2025-06-05T21:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a filter in timeseries gives strange effect, is it a bug or is it a feature?</title>
      <link>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278858#M2173</link>
      <description>&lt;P&gt;one more addon, if you want to keep timeseries:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| fieldsAdd x = timeout[] + new[]&lt;BR /&gt;| fieldsKeep timeframe,interval,x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have fun!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 08:06:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Adding-a-filter-in-timeseries-gives-strange-effect-is-it-a-bug/m-p/278858#M2173</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2025-06-06T08:06:19Z</dc:date>
    </item>
  </channel>
</rss>

