<?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: Current request count vs baseline in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/295285#M3174</link>
    <description>&lt;P&gt;I tried to use this in a notebook. But when I try to validate my anomaly detection settings with this query it is not working. The query below with join is working for me.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Feb 2026 15:20:54 GMT</pubDate>
    <dc:creator>OnkarShinde</dc:creator>
    <dc:date>2026-02-25T15:20:54Z</dc:date>
    <item>
      <title>Current request count vs baseline</title>
      <link>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/294812#M3152</link>
      <description>&lt;P&gt;I am trying to create a DQL to measure the current request count as percentage of the baseline. I intend to use it in an SLO configuration.&lt;/P&gt;
&lt;P&gt;I tried something like this:&lt;/P&gt;
&lt;P&gt;timeseries { today=sum(dt.service.request.count),by: { dt.entity.service }, interval:1m}&lt;BR /&gt;| append [ timeseries {yesterday=sum(dt.service.request.count),by: { dt.entity.service }, shift:-24h, interval:1m} ]&lt;BR /&gt;| filter dt.entity.service=="SERVICE-ABC"&lt;BR /&gt;| fieldsAdd sli=((today[]/yesterday[])*(100))&lt;/P&gt;
&lt;P&gt;But this gives me just one data point and not a time series.&lt;/P&gt;
&lt;P&gt;I also looked into the documentation but can not find any details on how to achieve this.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2026 07:16:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/294812#M3152</guid>
      <dc:creator>OnkarShinde</dc:creator>
      <dc:date>2026-02-18T07:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Current request count vs baseline</title>
      <link>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/294817#M3153</link>
      <description>&lt;P&gt;Good day,&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/72218"&gt;@OnkarShinde&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try to replace the append by lookup instead.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { today=sum(dt.service.request.count),by: { dt.entity.service }, interval:1m}
| lookup [ timeseries {yesterday=sum(dt.service.request.count)
          ,by: { dt.entity.service }, shift:-24h, interval:1m} ] , sourceField:dt.entity.service, lookupField:dt.entity.service
| filter dt.entity.service=="SERVICE-ABC"
| fieldsAdd sli=((today[]/lookup.yesterday[])*(100))&lt;/LI-CODE&gt;&lt;P&gt;Try and let us know.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Feb 2026 18:30:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/294817#M3153</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2026-02-16T18:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Current request count vs baseline</title>
      <link>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/294864#M3154</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;The issue is that append stacks rows from the subquery; it doesn’t place yesterday into the same record as today. So you end up dividing values that usually don’t coexist in one row, which effectively collapses to a single meaningful point (or mostly nulls).&amp;nbsp;Use a join.&lt;BR /&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries today = sum(dt.service.request.count, default: 0),
         by: { dt.entity.service },
         interval: 1m
| filter dt.entity.service == "SERVICE-076EAECF9109883D"
| join on: { dt.entity.service, interval }, [
    timeseries yesterday = sum(dt.service.request.count, default: 0),
             by: { dt.entity.service },
             shift: -24h,
             interval: 1m
  ], fields: { yesterday }
| fieldsAdd sli = if(yesterday[] == 0, 0, else: (today[] / yesterday[]) * 100)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_0-1771333150005.png" style="width: 603px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32043i40539B697BBD06D0/image-dimensions/603x281?v=v2" width="603" height="281" role="button" title="t_pawlak_0-1771333150005.png" alt="t_pawlak_0-1771333150005.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 12:59:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/294864#M3154</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2026-02-17T12:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Current request count vs baseline</title>
      <link>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/295273#M3171</link>
      <description>&lt;P&gt;Should the last line be changed to?&lt;/P&gt;&lt;P&gt;fieldsAdd sli = if(yesterday[] == 0, &lt;STRONG&gt;100&lt;/STRONG&gt;, else: (today[] / yesterday[]) * 100)&lt;/P&gt;&lt;P&gt;If there were no requests yesterday why should the SLI be considered 0, I would rather consider them 100? The intent is to detect the drop in the requests, don't care if there is increase compared to yestertday&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 12:19:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/295273#M3171</guid>
      <dc:creator>OnkarShinde</dc:creator>
      <dc:date>2026-02-25T12:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Current request count vs baseline</title>
      <link>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/295285#M3174</link>
      <description>&lt;P&gt;I tried to use this in a notebook. But when I try to validate my anomaly detection settings with this query it is not working. The query below with join is working for me.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 15:20:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Current-request-count-vs-baseline/m-p/295285#M3174</guid>
      <dc:creator>OnkarShinde</dc:creator>
      <dc:date>2026-02-25T15:20:54Z</dc:date>
    </item>
  </channel>
</rss>

