<?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: Rebuilding the Problems tile from Dashboards classic to the new Dashboards app in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287547#M2659</link>
    <description>&lt;P&gt;Hi Georgi&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;You could try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems
| filter event.status == "ACTIVE"
| summarize activeProblems = countDistinct(event.id)&lt;/LI-CODE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;event.id&lt;/STRONG&gt;&lt;/EM&gt; is the unique problem identifier, so countDistinct will return the number of open problems, not the number of entities.&lt;BR /&gt;Or&amp;nbsp;More robust (take the latest status per problem first)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems
| summarize lastStatus = takeLast(event.status), by: { event.id }
| filter lastStatus == "ACTIVE"
| summarize activeProblems = count()&lt;/LI-CODE&gt;&lt;P&gt;This way you collapse everything to &lt;STRONG&gt;one row per problem&lt;/STRONG&gt; (last known status), then count only those still active. This avoids duplicates caused by status updates or multiple affected entities.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Oct 2025 07:34:51 GMT</pubDate>
    <dc:creator>t_pawlak</dc:creator>
    <dc:date>2025-10-09T07:34:51Z</dc:date>
    <item>
      <title>Rebuilding the Problems tile from Dashboards classic to the new Dashboards app</title>
      <link>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287541#M2658</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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:&lt;BR /&gt;&lt;BR /&gt;fetch dt.davis.problems&lt;BR /&gt;| filter event.kind == "DAVIS_PROBLEM"&lt;BR /&gt;//| filter event.status == "ACTIVE"&lt;BR /&gt;| filter event.status != "CLOSED"&lt;BR /&gt;| summarize {activeProblems = countDistinct(event.id)}&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Has anyone faced this?&lt;BR /&gt;&lt;BR /&gt;All the best,&lt;BR /&gt;Georgi&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 06:29:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287541#M2658</guid>
      <dc:creator>Georgi_Vuldzhev</dc:creator>
      <dc:date>2025-10-09T06:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuilding the Problems tile from Dashboards classic to the new Dashboards app</title>
      <link>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287547#M2659</link>
      <description>&lt;P&gt;Hi Georgi&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;You could try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems
| filter event.status == "ACTIVE"
| summarize activeProblems = countDistinct(event.id)&lt;/LI-CODE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;event.id&lt;/STRONG&gt;&lt;/EM&gt; is the unique problem identifier, so countDistinct will return the number of open problems, not the number of entities.&lt;BR /&gt;Or&amp;nbsp;More robust (take the latest status per problem first)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems
| summarize lastStatus = takeLast(event.status), by: { event.id }
| filter lastStatus == "ACTIVE"
| summarize activeProblems = count()&lt;/LI-CODE&gt;&lt;P&gt;This way you collapse everything to &lt;STRONG&gt;one row per problem&lt;/STRONG&gt; (last known status), then count only those still active. This avoids duplicates caused by status updates or multiple affected entities.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 07:34:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287547#M2659</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-10-09T07:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuilding the Problems tile from Dashboards classic to the new Dashboards app</title>
      <link>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287562#M2660</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/42367"&gt;@t_pawlak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried with:&lt;/P&gt;&lt;PRE&gt;fetch dt.davis.problems
| summarize lastStatus = takeLast(event.status), by: { event.id }
| filter lastStatus == "ACTIVE"
| summarize activeProblems = count()&lt;/PRE&gt;&lt;P&gt;but it still shows wrong amount of problems&lt;BR /&gt;Reality: 6 active problems (one with 2 affected entities)&lt;BR /&gt;Number shown: 7&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;It's really strange. It also gives the same number as:&lt;/P&gt;&lt;PRE&gt;fetch dt.davis.problems
| filter event.status == "ACTIVE"
| summarize activeProblems = countDistinct(event.id)&lt;/PRE&gt;&lt;P&gt;and also the same as my initial query.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 11:24:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287562#M2660</guid>
      <dc:creator>Georgi_Vuldzhev</dc:creator>
      <dc:date>2025-10-09T11:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuilding the Problems tile from Dashboards classic to the new Dashboards app</title>
      <link>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287608#M2666</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems
| filter not(dt.davis.is_duplicate)
| summarize lastStatus = takeLast(event.status), by: { event.id }
| filter lastStatus == "ACTIVE"
| summarize activeProblems = count()&lt;/LI-CODE&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;P&gt;not(dt.davis.is_duplicate) removes duplicate rows for the same problem.&lt;/P&gt;&lt;P&gt;takeLast(event.status) ensures you only look at the most recent status.&lt;/P&gt;&lt;P&gt;Filtering on ACTIVE after this guarantees that already “CLOSED” problems won’t be counted.&lt;/P&gt;&lt;P&gt;That’s why in your earlier attempts “solved” problems were still showing up as active.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2025 09:09:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/287608#M2666</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-10-10T09:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rebuilding the Problems tile from Dashboards classic to the new Dashboards app</title>
      <link>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/288038#M2686</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/42367"&gt;@t_pawlak&lt;/a&gt;,&lt;BR /&gt;I have tested this for couple of days and indeed it seems to work fine. Thanks a lot for your help!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 12:24:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Rebuilding-the-Problems-tile-from-Dashboards-classic-to-the-new/m-p/288038#M2686</guid>
      <dc:creator>Georgi_Vuldzhev</dc:creator>
      <dc:date>2025-10-16T12:24:27Z</dc:date>
    </item>
  </channel>
</rss>

