# DQL timeseries filter by list of services

**URL:** <https://community.dynatrace.com/t/dql-timeseries-filter-by-list-of-services/54124>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed, filter, timeseries\
**Created:** [November 19, 2025, 5:17am UTC](https://community.dynatrace.com/t/dql-timeseries-filter-by-list-of-services/54124 "2025-11-19T05:17:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PVThach](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@PVThach](https://community.dynatrace.com/u/PVThach)\
**Post date:** [November 19, 2025, 5:17am UTC](https://community.dynatrace.com/t/dql-timeseries-filter-by-list-of-services/54124/1 "2025-11-19T05:17:38Z")

</div>

I am trying to create a dashboard of external services health.&nbsp; &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.

fetch dt.entity.service  
| fieldsAdd entity.name, publicDomainName  
| filter isExternalService  
| filter isNotNull(publicDomainName)  
| filterOut contains(publicDomainName, “[my.com](http://my.com)”) // filter out internal or proxy  
| filter serviceType == “WEB\_REQUEST\_SERVICE”  
| fields entity.name // could be id

I am not sure how to filter timeseries.&nbsp; &nbsp;My timeseries look like this:

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 services as variable from previous DQL  
//filter:{ in(dt.entity.service, classicEntitySelector(concat(“type(service),entityName.equals(\“CashTransfer Service\”)”))) }. //this works but only for one service  
| fieldsAdd Service = entityName(dt.entity.service)  
| fieldsAdd Latency\_p75 = arrayAvg(latency\_p75),  
Latency\_p90 = arrayAvg(latency\_p90),  
Throughput = arraySum(Throughput),  
Errors = arraySum(errors),  
dt.entity.service

| fieldsAdd Availability = 100 - (Errors / Throughput) \* 100

| fields Service,

Status = if(Availability \< 98.00, “🔴 Unhealthy”, else: “✅ Healthy”),  
StatusSort = if(Availability \< 98.00, 0, else: 1),  
Availability,  
Throughput,  
Errors,  
Latency\_p75,  
Latency\_p90,  
dt.entity.service  
| sort StatusSort asc

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [November 19, 2025, 9:03am UTC](https://community.dynatrace.com/t/dql-timeseries-filter-by-list-of-services/54124/2 "2025-11-19T09:03:02Z")

</div>

Hi,  
The reason your approach doesn’t work is that dashboard DQL cannot join fetch results with timeseries.  
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.

try this approach:

```markup
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 < 98.0, ":red_circle: Unhealthy", else: ":white_heavy_check_mark: Healthy"),
    StatusSort = if(Availability < 98.0, 0, else: 1)

| fields
    Status,
    Service,
    Availability,
    Throughput,
    Errors,
    Latency_p75,
    Latency_p90,
    publicDomainName,
    dt.entity.service

| sort StatusSort asc, Availability asc

```

I tested it without variables, because I don’t have it on my env, but this is result:

 ![t_pawlak_0-1763542849655.png](https://global.discourse-cdn.com/dynatrace/original/2X/a/adf81f4c79fc486e1198fbc39bea5094ef72c317.png)

First use this query in a tile, then select Use as variable&nbsp;  
Then filter your timeseries using that variable  
I hope it will work

---

<div class="post-metadata">

**Author:** ![PVThach](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@PVThach](https://community.dynatrace.com/u/PVThach)\
**Post date:** [November 19, 2025, 2:42pm UTC](https://community.dynatrace.com/t/dql-timeseries-filter-by-list-of-services/54124/3 "2025-11-19T14:42:39Z")

</div>

It didn’t work for me.&nbsp; I am getting:

The field isExternalService doesn’t exist.

Any filter for field in dt.entity.service result in field doesn’t exist.

| filter isExternalService  
| filter isNotNull(publicDomainName)  
| filterOut contains(publicDomainName, “[my.com](http://my.com)”)  
| filter serviceType == “WEB\_REQUEST\_SERVICE”

I tried running in dashboard and notebook, same result.

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [November 19, 2025, 3:14pm UTC](https://community.dynatrace.com/t/dql-timeseries-filter-by-list-of-services/54124/4 "2025-11-19T15:14:37Z")

</div>

Hi, try this

```markup
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 < 98.0, ":red_circle: Unhealthy", else: ":white_heavy_check_mark: Healthy"),
    StatusSort = if(Availability < 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

```

 ![t_pawlak_0-1763565260617.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/72a7c49b00b36922acb5c3a0a5c932bd4f4eeafe.png)

---

<div class="post-metadata">

**Author:** ![PVThach](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@PVThach](https://community.dynatrace.com/u/PVThach)\
**Post date:** [November 19, 2025, 5:10pm UTC](https://community.dynatrace.com/t/dql-timeseries-filter-by-list-of-services/54124/5 "2025-11-19T17:10:09Z")

</div>

Perfect, thanks!
