<?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: DQL timeseries filter by list of services in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289816#M2793</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;The reason your approach doesn’t work is that dashboard DQL cannot join fetch results with timeseries.&lt;BR /&gt;join only works when both sides produce the same type of records, and fetch dt.entity.* produces entity records, while timeseries produces metric records. That’s why filtering the second query based on the first one isn’t supported directly.&lt;BR /&gt;&lt;BR /&gt;try this approach:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries {
    latency_p75 = percentile(dt.service.request.response_time, 75),
    latency_p90 = percentile(dt.service.request.response_time, 90),
    Throughput  = sum(dt.service.request.count),
    Errors      = sum(dt.service.request.failure_count)
}, by: { dt.entity.service }
| filter isExternalService
| filter isNotNull(publicDomainName)
| filterOut contains(publicDomainName, "my.com")
| filter serviceType == "WEB_REQUEST_SERVICE"

| fieldsAdd
    Service = entityName(dt.entity.service),
    Latency_p75 = arrayAvg(latency_p75),
    Latency_p90 = arrayAvg(latency_p90),
    Throughput = arraySum(Throughput),
    Errors = arraySum(Errors)

| fieldsAdd Availability = 100 - (Errors / Throughput) * 100

| fieldsAdd
    Status = if(Availability &amp;lt; 98.0, ":red_circle: Unhealthy", else: ":white_heavy_check_mark: Healthy"),
    StatusSort = if(Availability &amp;lt; 98.0, 0, else: 1)

| fields
    Status,
    Service,
    Availability,
    Throughput,
    Errors,
    Latency_p75,
    Latency_p90,
    publicDomainName,
    dt.entity.service

| sort StatusSort asc, Availability asc&lt;/LI-CODE&gt;&lt;P&gt;I tested it without variables, because I don't have it on my env, but this is result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_0-1763542849655.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/30934iFB9AF853CE33A1E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="t_pawlak_0-1763542849655.png" alt="t_pawlak_0-1763542849655.png" /&gt;&lt;/span&gt;&lt;BR /&gt;First use this query in a tile, then select Use as variable&amp;nbsp;&lt;BR /&gt;Then filter your timeseries using that variable&lt;BR /&gt;I hope it will work&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>Wed, 19 Nov 2025 09:03:02 GMT</pubDate>
    <dc:creator>t_pawlak</dc:creator>
    <dc:date>2025-11-19T09:03:02Z</dc:date>
    <item>
      <title>DQL timeseries filter by list of services</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289796#M2792</link>
      <description>&lt;P&gt;I am trying to create a dashboard of external services health.&amp;nbsp; &amp;nbsp;I am able to get list of 20 external services with this DQL, which I am thinking to use a variable input to the dashboard.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;fetch dt.entity.service&lt;BR /&gt;| fieldsAdd entity.name, publicDomainName&lt;BR /&gt;| filter isExternalService&lt;BR /&gt;| filter isNotNull(publicDomainName)&lt;BR /&gt;| filterOut contains(publicDomainName, "my.com") // filter out internal or proxy&lt;BR /&gt;| filter serviceType == "WEB_REQUEST_SERVICE"&lt;BR /&gt;| fields entity.name // could be id&lt;/P&gt;&lt;P&gt;I am not sure how to filter timeseries.&amp;nbsp; &amp;nbsp;My timeseries look like this:&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;timeseries {&lt;BR /&gt;latency_p75 = percentile(dt.service.request.response_time, 75),&lt;BR /&gt;latency_p90 = percentile(dt.service.request.response_time, 90),&lt;BR /&gt;Throughput = sum(dt.service.request.count),&lt;BR /&gt;errors = sum(dt.service.request.failure_count)&lt;BR /&gt;},&lt;BR /&gt;by: dt.entity.service,&lt;BR /&gt;// FILTER services as variable from previous DQL&lt;BR /&gt;//filter:{ in(dt.entity.service, classicEntitySelector(concat("type(service),entityName.equals(\"CashTransfer Service\")"))) }. //this works but only for one service&lt;BR /&gt;| fieldsAdd Service = entityName(dt.entity.service)&lt;BR /&gt;| fieldsAdd Latency_p75 = arrayAvg(latency_p75),&lt;BR /&gt;Latency_p90 = arrayAvg(latency_p90),&lt;BR /&gt;Throughput = arraySum(Throughput),&lt;BR /&gt;Errors = arraySum(errors),&lt;BR /&gt;dt.entity.service&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;| fieldsAdd Availability = 100 - (Errors / Throughput) * 100&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;| fields Service,&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;Status = if(Availability &amp;lt; 98.00, "&lt;span class="lia-unicode-emoji" title=":red_circle:"&gt;🔴&lt;/span&gt; Unhealthy", else: "&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Healthy"),&lt;BR /&gt;StatusSort = if(Availability &amp;lt; 98.00, 0, else: 1),&lt;BR /&gt;Availability,&lt;BR /&gt;Throughput,&lt;BR /&gt;Errors,&lt;BR /&gt;Latency_p75,&lt;BR /&gt;Latency_p90,&lt;BR /&gt;dt.entity.service&lt;BR /&gt;| sort StatusSort asc&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 05:17:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289796#M2792</guid>
      <dc:creator>PVThach</dc:creator>
      <dc:date>2025-11-19T05:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: DQL timeseries filter by list of services</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289816#M2793</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;The reason your approach doesn’t work is that dashboard DQL cannot join fetch results with timeseries.&lt;BR /&gt;join only works when both sides produce the same type of records, and fetch dt.entity.* produces entity records, while timeseries produces metric records. That’s why filtering the second query based on the first one isn’t supported directly.&lt;BR /&gt;&lt;BR /&gt;try this approach:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries {
    latency_p75 = percentile(dt.service.request.response_time, 75),
    latency_p90 = percentile(dt.service.request.response_time, 90),
    Throughput  = sum(dt.service.request.count),
    Errors      = sum(dt.service.request.failure_count)
}, by: { dt.entity.service }
| filter isExternalService
| filter isNotNull(publicDomainName)
| filterOut contains(publicDomainName, "my.com")
| filter serviceType == "WEB_REQUEST_SERVICE"

| fieldsAdd
    Service = entityName(dt.entity.service),
    Latency_p75 = arrayAvg(latency_p75),
    Latency_p90 = arrayAvg(latency_p90),
    Throughput = arraySum(Throughput),
    Errors = arraySum(Errors)

| fieldsAdd Availability = 100 - (Errors / Throughput) * 100

| fieldsAdd
    Status = if(Availability &amp;lt; 98.0, ":red_circle: Unhealthy", else: ":white_heavy_check_mark: Healthy"),
    StatusSort = if(Availability &amp;lt; 98.0, 0, else: 1)

| fields
    Status,
    Service,
    Availability,
    Throughput,
    Errors,
    Latency_p75,
    Latency_p90,
    publicDomainName,
    dt.entity.service

| sort StatusSort asc, Availability asc&lt;/LI-CODE&gt;&lt;P&gt;I tested it without variables, because I don't have it on my env, but this is result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_0-1763542849655.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/30934iFB9AF853CE33A1E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="t_pawlak_0-1763542849655.png" alt="t_pawlak_0-1763542849655.png" /&gt;&lt;/span&gt;&lt;BR /&gt;First use this query in a tile, then select Use as variable&amp;nbsp;&lt;BR /&gt;Then filter your timeseries using that variable&lt;BR /&gt;I hope it will work&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>Wed, 19 Nov 2025 09:03:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289816#M2793</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-11-19T09:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: DQL timeseries filter by list of services</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289868#M2803</link>
      <description>&lt;P&gt;It didn't work for me.&amp;nbsp; I am getting:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN class=""&gt;The field isExternalService doesn't exist.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any filter for field in dt.entity.service result in field doesn't exist.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;| filter isExternalService&lt;BR /&gt;| filter isNotNull(publicDomainName)&lt;BR /&gt;| filterOut contains(publicDomainName, "my.com")&lt;BR /&gt;| filter serviceType == "WEB_REQUEST_SERVICE"&lt;/P&gt;&lt;P&gt;I tried running in dashboard and notebook, same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 14:42:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289868#M2803</guid>
      <dc:creator>PVThach</dc:creator>
      <dc:date>2025-11-19T14:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: DQL timeseries filter by list of services</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289878#M2804</link>
      <description>&lt;P&gt;Hi, try this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries {
    latency_p75 = percentile(dt.service.request.response_time, 75),
    latency_p90 = percentile(dt.service.request.response_time, 90),
    Throughput  = sum(dt.service.request.count),
    Errors      = sum(dt.service.request.failure_count)
}, by: { dt.entity.service }


| fieldsAdd
    isExternalService = entityAttr(dt.entity.service, "isExternalService"),
    publicDomainName  = entityAttr(dt.entity.service, "publicDomainName"),
    serviceType       = entityAttr(dt.entity.service, "serviceType")


| filter isExternalService
| filter isNotNull(publicDomainName)
| filterOut contains(publicDomainName, "my.com")
| filter serviceType == "WEB_REQUEST_SERVICE"

| fieldsAdd
    Service      = entityName(dt.entity.service),
    Latency_p75  = arrayAvg(latency_p75),
    Latency_p90  = arrayAvg(latency_p90),
    Throughput   = arraySum(Throughput),
    Errors       = arraySum(Errors)

| fieldsAdd Availability = 100 - (Errors / Throughput) * 100

| fieldsAdd
    Status     = if(Availability &amp;lt; 98.0, ":red_circle: Unhealthy", else: ":white_heavy_check_mark: Healthy"),
    StatusSort = if(Availability &amp;lt; 98.0, 0, else: 1)

| fields
    Status,
    StatusSort,
    Service,
    Availability,
    Throughput,
    Errors,
    Latency_p75,
    Latency_p90,
    publicDomainName,
    dt.entity.service

| sort StatusSort asc, Availability asc&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="t_pawlak_0-1763565260617.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/30956i08D99695D321A642/image-size/medium?v=v2&amp;amp;px=400" role="button" title="t_pawlak_0-1763565260617.png" alt="t_pawlak_0-1763565260617.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 15:14:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289878#M2804</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-11-19T15:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: DQL timeseries filter by list of services</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289895#M2808</link>
      <description>&lt;P&gt;Perfect, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 17:10:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-timeseries-filter-by-list-of-services/m-p/289895#M2808</guid>
      <dc:creator>PVThach</dc:creator>
      <dc:date>2025-11-19T17:10:09Z</dc:date>
    </item>
  </channel>
</rss>

