# Give a service, find if calling service having problem

**URL:** <https://community.dynatrace.com/t/give-a-service-find-if-calling-service-having-problem/54613>\
**Category:** DQL\
**Tags:** dql\
**Created:** [January 13, 2026, 4:46pm UTC](https://community.dynatrace.com/t/give-a-service-find-if-calling-service-having-problem/54613 "2026-01-13T16:46:10Z")\
**Posts on this page:** 2\
**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:** [January 13, 2026, 4:46pm UTC](https://community.dynatrace.com/t/give-a-service-find-if-calling-service-having-problem/54613/1 "2026-01-13T16:46:10Z")

</div>

I’m looking for guidance on creating a DQL query for as dashboard that can:

1. Take a given list of services.
2. Identify their associated upstream and downstream dependencies.
3. Display any alerts (active, or closed) that are impacting or affecting these services.

The goal is to have a clear view of service relationships and understand how alerts propagate across dependencies. If anyone has an example query or best practices for achieving this in Dynatrace, I’d greatly appreciate your input.  
Here my attempt look for at problem in upstream services.

```javascript
fetch dt.entity.service 
//|filter in(id, "SERVICE-24844D84E75DDE51", "SERVICE-96A302DC14A0CCE9") // dashboard varaible
|fieldsAdd upstream_ids = called_by[dt.entity.service]
|expand upstream_id = upstream_ids // upstream_id = Caller_id
// Get associated upstream service
| lookup [fetch dt.entity.service | fieldsAdd managementZones], sourceField:upstream_id, lookupField:id, executionOrder:leftFirst, prefix: "Caller_"

// Get problem assoicated(impacting or affecting) these upstream services
// this is where I need help, I'm getting null 
| lookup [fetch dt.davis.problems], //| filter affected_entity_types == array(called_by[dt.entity.service]) | expand affected_entity_ids ]
         sourceField:Caller_id, lookupField:id, executionOrder:leftFirst, prefix: "Alert_"

| fields managementZones, entity.name, id, Caller_id,
Caller_entity.name,
Caller_managementZones, Alert_name, Alert_display_id

|sort entity.name

```

---

<div class="post-metadata">

**Author:** ![raksh\_hitha](https://avatars.discourse-cdn.com/v4/letter/r/898d66/32.png) [@raksh\_hitha](https://community.dynatrace.com/u/raksh_hitha)\
**Post date:** [January 28, 2026, 12:17pm UTC](https://community.dynatrace.com/t/give-a-service-find-if-calling-service-having-problem/54613/2 "2026-01-28T12:17:52Z")

</div>

Hi&nbsp;[@PVThach](https://community.dynatrace.com/user/94299)&nbsp;,

fetch dt.entity.service  
| expand downstream\_service = calls[dt.entity.service]  
| fieldsAdd downstream\_service\_name = entityName(downstream\_service, type:“dt.entity.service”)  
| expand upstream\_service = called\_by[dt.entity.service]  
| fieldsAdd upstream\_service\_name = entityName(upstream\_service, type:“dt.entity.service”)  
| lookup&nbsp;  
[  
fetch dt.davis.problems  
| expand affected\_entity\_ids  
], sourceField:id, lookupField:affected\_entity\_ids, prefix:“problem.”  
| fieldsAdd problem\_id = problem.display\_id  
| fields entity.name, upstream\_service\_name, downstream\_service\_name, problem\_id, managementZones

Feel free to modify it further based on your requirements.
