<?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 how to display the number of problems and trends? in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/how-to-display-the-number-of-problems-and-trends/m-p/257808#M1278</link>
    <description>&lt;P&gt;I would like to use the single value visualization on the dashboard to display the number of PROBLEMS and trends by ENTITY TYPE.&lt;/P&gt;
&lt;P&gt;I was able to display the following DQL for the number of PROBLEMS.&lt;/P&gt;
&lt;P&gt;How can I display trend?&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;fetch dt.davis.problems&lt;BR /&gt;|filter matchesValue(affected_entity_types,"dt.entity.process_group_instance")&lt;BR /&gt;| lookup [&lt;BR /&gt;fetch dt.entity.process_group_instance&lt;BR /&gt;], sourceField:affected_entity_ids, lookupField:id&lt;BR /&gt;| fields root_cause_entity_name, display_id, event.category, event.start, timestamp&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;| summarize count()&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2024 07:08:34 GMT</pubDate>
    <dc:creator>Taihei</dc:creator>
    <dc:date>2024-10-03T07:08:34Z</dc:date>
    <item>
      <title>how to display the number of problems and trends?</title>
      <link>https://community.dynatrace.com/t5/DQL/how-to-display-the-number-of-problems-and-trends/m-p/257808#M1278</link>
      <description>&lt;P&gt;I would like to use the single value visualization on the dashboard to display the number of PROBLEMS and trends by ENTITY TYPE.&lt;/P&gt;
&lt;P&gt;I was able to display the following DQL for the number of PROBLEMS.&lt;/P&gt;
&lt;P&gt;How can I display trend?&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;fetch dt.davis.problems&lt;BR /&gt;|filter matchesValue(affected_entity_types,"dt.entity.process_group_instance")&lt;BR /&gt;| lookup [&lt;BR /&gt;fetch dt.entity.process_group_instance&lt;BR /&gt;], sourceField:affected_entity_ids, lookupField:id&lt;BR /&gt;| fields root_cause_entity_name, display_id, event.category, event.start, timestamp&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;| summarize count()&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 07:08:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/how-to-display-the-number-of-problems-and-trends/m-p/257808#M1278</guid>
      <dc:creator>Taihei</dc:creator>
      <dc:date>2024-10-03T07:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to display the number of problems and trends?</title>
      <link>https://community.dynatrace.com/t5/DQL/how-to-display-the-number-of-problems-and-trends/m-p/257842#M1279</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/69979"&gt;@Taihei&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;I'm not sure I fully understood your problem. Correct me if I didn't.&lt;/P&gt;&lt;P&gt;From what I gathered, you're trying to see the trend that the number of problems from a given entity type follows. Is this correct?&lt;/P&gt;&lt;P&gt;Your query seems to be aiming at specifically following the number of problems that affect entity type "dt.entity.process_group_instance".&lt;BR /&gt;&lt;BR /&gt;I tried to do the same for problems affecting entity type host (If you're only interested in the number of problems affecting a certain entity type, you do not need the lookup) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems //fetch all problems
| filter matchesValue(affected_entity_types, "dt.entity.host") //filter for the entity_type you want
| makeTimeseries count(default: 0), // Use timeseries, default to 0 if no data
    interval: 15m  // Set the time interval you need&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With timeseries you can produce a number of values in intervals within your timeframe.&lt;/P&gt;&lt;P&gt;With the single value tile this produces the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_1-1727879185168.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/23125iFC208B1DC2266DBD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_1-1727879185168.png" alt="PedroSantos_1-1727879185168.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The array is the number of problems affecting Hosts over the course of 2 hours, with 15 minute intervals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can mess around with Visualize to make it look better:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_0-1727881991422.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/23131i3B52CF0177D65A57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_0-1727881991422.png" alt="PedroSantos_0-1727881991422.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_2-1727879816616.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/23127i186BD27FE8E33BA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_2-1727879816616.png" alt="PedroSantos_2-1727879816616.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;Do note that this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems //fetch all problems
| filter matchesValue(affected_entity_types, "dt.entity.process_group_instance") //filter for the entity_type you want
| makeTimeseries count(default: 0), // Use timeseries
    interval: 15m  // Set the time interval you need&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems
|filter matchesValue(affected_entity_types,"dt.entity.process_group_instance")
| lookup [
fetch dt.entity.process_group_instance
], sourceField:affected_entity_ids, lookupField:id
|fields root_cause_entity_name, display_id, event.category, event.start, timestamp
| makeTimeseries count(default: 0), // Use timeseries
    interval: 15m  // Set the time interval you need&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both these will, &lt;U&gt;&lt;STRONG&gt;for our purposes&lt;/STRONG&gt;&lt;/U&gt;, produce the exact same results. Because we're using single value tiles, we don't need the extra fields.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 15:16:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/how-to-display-the-number-of-problems-and-trends/m-p/257842#M1279</guid>
      <dc:creator>PedroSantos</dc:creator>
      <dc:date>2024-10-02T15:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to display the number of problems and trends?</title>
      <link>https://community.dynatrace.com/t5/DQL/how-to-display-the-number-of-problems-and-trends/m-p/257898#M1285</link>
      <description>&lt;P&gt;Of course if you have a specific need for "singleValue" you can calculate it and keep in final query result. E.g. using query from&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77112"&gt;@PedroSantos&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.davis.problems //fetch all problems
| filter matchesValue(affected_entity_types, "dt.entity.process_group_instance") //filter for the entity_type you want
| makeTimeseries sparkline=count(default: 0), // Use timeseries
    interval: 15m  // Set the time interval you need
| fieldsAdd singleValue=arraySum(sparkline)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1727901697237.png" style="width: 812px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/23150iE58278A81E898563/image-dimensions/812x350?v=v2" width="812" height="350" role="button" title="krzysztof_hoja_0-1727901697237.png" alt="krzysztof_hoja_0-1727901697237.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If needed value cannot be calculated from timeseries used as sparkline you can always add needed value using &lt;EM&gt;&lt;STRONG&gt;lookup&lt;/STRONG&gt; &lt;/EM&gt;or &lt;EM&gt;&lt;STRONG&gt;join&lt;/STRONG&gt; &lt;/EM&gt;command&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 20:43:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/how-to-display-the-number-of-problems-and-trends/m-p/257898#M1285</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-10-02T20:43:33Z</dc:date>
    </item>
  </channel>
</rss>

