# Rebuilding the Problems tile from Dashboards classic to the new Dashboards app

**URL:** <https://community.dynatrace.com/t/rebuilding-the-problems-tile-from-dashboards-classic-to-the-new-dashboards-app/53668>\
**Category:** DQL\
**Tags:** dql, latest-dynatrace, dashboards, charts\
**Created:** [October 9, 2025, 6:29am UTC](https://community.dynatrace.com/t/rebuilding-the-problems-tile-from-dashboards-classic-to-the-new-dashboards-app/53668 "2025-10-09T06:29:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgiv77](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@georgiv77](https://community.dynatrace.com/u/georgiv77)\
**Post date:** [October 9, 2025, 6:29am UTC](https://community.dynatrace.com/t/rebuilding-the-problems-tile-from-dashboards-classic-to-the-new-dashboards-app/53668/1 "2025-10-09T06:29:33Z")

</div>

Hello everyone,

I am facing a really annoying issue when I started rebuilding some of our Dashboards from Managed in the app in SaaS. I am fairly new with DQL, however I find it strange that something this simple is overcomplicated in SaaS.

What I am struggling with is that I am trying to display all currently active problems in a Dashboard but I don’t find an easy way to do that. By using the pre-built “Problems” tile you get a list, OK. But when I try to show a single value tile I happen to fail displaying the actual number of open problems. I am using this DQL query:

fetch dt.davis.problems  
| filter event.kind == “DAVIS\_PROBLEM”  
//| filter event.status == “ACTIVE”  
| filter event.status != “CLOSED”  
| summarize {activeProblems = countDistinct(event.id)}

Even though I am looking for open problems I always get the number of affected entities, instead of the problem count. This means that if I have 3 open problems and one of them affects 5 hosts, the number I get in the tile is 7, which is not right.

I tried several different approaches, but I kind of miss how to get it to work properly. Probably it’s me…but still it was so much easier in Managed.

Has anyone faced this?

All the best,  
Georgi

---

<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:** [October 9, 2025, 7:34am UTC](https://community.dynatrace.com/t/rebuilding-the-problems-tile-from-dashboards-classic-to-the-new-dashboards-app/53668/2 "2025-10-09T07:34:51Z")

</div>

Hi Georgi

IMO what you’re seeing happens because dt.davis.problems emits multiple records per problem (including updates and affected entities). A straight count can easily “overcount” when one problem affects multiple hosts.  
You could try this:

```markup
fetch dt.davis.problems
| filter event.status == "ACTIVE"
| summarize activeProblems = countDistinct(event.id)

```

_ **event.id** _ is the unique problem identifier, so countDistinct will return the number of open problems, not the number of entities.  
Or&nbsp;More robust (take the latest status per problem first)

```markup
fetch dt.davis.problems
| summarize lastStatus = takeLast(event.status), by: { event.id }
| filter lastStatus == "ACTIVE"
| summarize activeProblems = count()

```

This way you collapse everything to **one row per problem** (last known status), then count only those still active. This avoids duplicates caused by status updates or multiple affected entities.

---

<div class="post-metadata">

**Author:** ![georgiv77](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@georgiv77](https://community.dynatrace.com/u/georgiv77)\
**Post date:** [October 9, 2025, 11:24am UTC](https://community.dynatrace.com/t/rebuilding-the-problems-tile-from-dashboards-classic-to-the-new-dashboards-app/53668/3 "2025-10-09T11:24:22Z")

</div>

Hi [@t\_pawlak](https://community.dynatrace.com/user/42367) ,

I tried with:

```auto
fetch dt.davis.problems
| summarize lastStatus = takeLast(event.status), by: { event.id }
| filter lastStatus == "ACTIVE"
| summarize activeProblems = count()

```

but it still shows wrong amount of problems  
Reality: 6 active problems (one with 2 affected entities)  
Number shown: 7

It’s really strange. It also gives the same number as:

```auto
fetch dt.davis.problems
| filter event.status == "ACTIVE"
| summarize activeProblems = countDistinct(event.id)

```

and also the same as my initial query.

---

<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:** [October 10, 2025, 9:09am UTC](https://community.dynatrace.com/t/rebuilding-the-problems-tile-from-dashboards-classic-to-the-new-dashboards-app/53668/4 "2025-10-10T09:09:11Z")

</div>

You’re right — what you’re seeing happens because dt.davis.problems returns multiple records per problem (updates, affected entities, historical statuses). A simple countDistinct(event.id) can still “overcount” since it includes historical entries.

The trick is to always collapse to the latest status per problem and remove duplicates. You can do this with takeLast() and the dt.davis.is\_duplicate flag:

```markup
fetch dt.davis.problems
| filter not(dt.davis.is_duplicate)
| summarize lastStatus = takeLast(event.status), by: { event.id }
| filter lastStatus == "ACTIVE"
| summarize activeProblems = count()

```

Explanation:

not(dt.davis.is\_duplicate) removes duplicate rows for the same problem.

takeLast(event.status) ensures you only look at the most recent status.

Filtering on ACTIVE after this guarantees that already “CLOSED” problems won’t be counted.

That’s why in your earlier attempts “solved” problems were still showing up as active.

---

<div class="post-metadata">

**Author:** ![georgiv77](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@georgiv77](https://community.dynatrace.com/u/georgiv77)\
**Post date:** [October 16, 2025, 12:24pm UTC](https://community.dynatrace.com/t/rebuilding-the-problems-tile-from-dashboards-classic-to-the-new-dashboards-app/53668/5 "2025-10-16T12:24:27Z")

</div>

Hi [@t\_pawlak](https://community.dynatrace.com/user/42367),  
I have tested this for couple of days and indeed it seems to work fine. Thanks a lot for your help!
