<?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: How to consolidate data into a sum within timeseries in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302781#M3448</link>
    <description>&lt;P&gt;Try to remove the url.path field at the end of your DQL.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Aug 2026 18:19:45 GMT</pubDate>
    <dc:creator>dannemca</dc:creator>
    <dc:date>2026-08-03T18:19:45Z</dc:date>
    <item>
      <title>How to consolidate data into a sum within timeseries</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302670#M3445</link>
      <description>&lt;P&gt;Currently I am use the following DQL to list out the web request count for our API calls:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { sum(webrequest) }, by: { http.response.status_code, server.address, TenantID, Tenant, url.path }
| fieldsAdd Tenant = if (tolong(TenantID) == 6, "Singapore")
| fieldsAdd Tenant = if (tolong(TenantID) == 7, "Australia", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 8, "Philippine", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 9, "Malaysia", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 10, "Thailand", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 11, "Hong Kong", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 13, "Indonesia", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 14, "Vietnam", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 15, "New Zealand", else:Tenant)
| fieldsAdd Tenant = if (tolong(TenantID) == 22, "CDM", else:Tenant)
| filterOut isNull(Tenant)
| filter http.response.status_code &amp;gt;= 404 and http.response.status_code &amp;lt;= 599
| filter matchesValue(server.address, "abc.com")
| fieldsRemove server.address&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have found there are quite a few of API calls which involve individual membership numbers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hillman_0-1785486983380.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33817i2E5A057F0CD9C016/image-size/medium?v=v2&amp;amp;px=400" alt="Hillman_0-1785486983380.png" title="Hillman_0-1785486983380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I try to use DQL to remove the membership number from the URL:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fieldsAdd URL = url.path
| fieldsAdd URL = if(
      matchesValue(url.path, "*/memberships/*"),
      concat(
         splitString(url.path, "/memberships/")[0],
         "/memberships"
      ),
      else: URL
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the resultant data end up look this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hillman_0-1785724510428.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33833i47490C30E3D33FAD/image-size/medium?v=v2&amp;amp;px=400" alt="Hillman_0-1785724510428.png" title="Hillman_0-1785724510428.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there any way I can sum up the URL request count and consolidate /memberships into a single entry?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2026 02:35:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302670#M3445</guid>
      <dc:creator>Hillman</dc:creator>
      <dc:date>2026-08-03T02:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to consolidate data into a sum within timeseries</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302746#M3447</link>
      <description>&lt;P&gt;Can I ask how you are currently monitoring the API? Are you monitoring it as a regular service? Is it showing up when you open the Services app?&lt;/P&gt;&lt;P&gt;Then I would suggest to use URL cleaning rules. Go to your Services app, select your service, go to it's settings via the three dots [...] and then select Request Naming Rules. You could write&amp;nbsp; the cleaning rules also globally but here I only do it for the specific service.&lt;/P&gt;&lt;P&gt;Start with the clean URL rules where you can also use regex to get the numbers/ids out. After, if you want, you can also use the new (shortened without IDs/numbers) URL for your request naming by writing request naming rules below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marina_pollehn_0-1785747517268.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33836iB449619E6404B3DA/image-size/medium?v=v2&amp;amp;px=400" alt="marina_pollehn_0-1785747517268.png" title="marina_pollehn_0-1785747517268.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A RegEx like:&amp;nbsp;^.*?\/memberships&amp;nbsp; &amp;nbsp; could capture everything before and including /memberships and remove everything after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I think you might be following a different approach to monitor it? I can't fully reproduce the data in my playground quickly, but I think the issue is that you never remove the old url.path variable. If you remove it, DQL can no longer split the sum up even more by using url.path, which will give you more aggregated values.&lt;/P&gt;&lt;P&gt;So I would include this as a last step, after the last line of DQL you have shared.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fieldsRemove url.path&lt;/LI-CODE&gt;&lt;P&gt;If this is not working, let me know, then I will put some effort into reproducing your data.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2026 09:29:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302746#M3447</guid>
      <dc:creator>marina_pollehn</dc:creator>
      <dc:date>2026-08-03T09:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to consolidate data into a sum within timeseries</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302781#M3448</link>
      <description>&lt;P&gt;Try to remove the url.path field at the end of your DQL.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2026 18:19:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302781#M3448</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2026-08-03T18:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to consolidate data into a sum within timeseries</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302861#M3449</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/2456"&gt;@marina_pollehn&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/18264"&gt;@dannemca&lt;/a&gt;&amp;nbsp; I have created an Open Pipeline and retrieving the data from spans. I have tried with removing the field url.path and it works as expected. Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2026 04:00:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-consolidate-data-into-a-sum-within-timeseries/m-p/302861#M3449</guid>
      <dc:creator>Hillman</dc:creator>
      <dc:date>2026-08-05T04:00:33Z</dc:date>
    </item>
  </channel>
</rss>

