<?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 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/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" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33817i2E5A057F0CD9C016/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hillman_0-1785486983380.png" alt="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_2-1785487872954.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33824i53B2B793527D2905/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hillman_2-1785487872954.png" alt="Hillman_2-1785487872954.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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>Fri, 31 Jul 2026 08:51:37 GMT</pubDate>
    <dc:creator>Hillman</dc:creator>
    <dc:date>2026-07-31T08:51:37Z</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" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33817i2E5A057F0CD9C016/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hillman_0-1785486983380.png" alt="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_2-1785487872954.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33824i53B2B793527D2905/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hillman_2-1785487872954.png" alt="Hillman_2-1785487872954.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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>Fri, 31 Jul 2026 08:51:37 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-07-31T08:51:37Z</dc:date>
    </item>
  </channel>
</rss>

