<?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: Count of Problem in each week by its category of the event type from last one month data in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221340#M220</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Sini,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Instead of the week in year can I get the start date of the week.&amp;nbsp; I was trying that but its failing. PFA screen shot for your reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bhargav&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 05:08:18 GMT</pubDate>
    <dc:creator>Bhargav_314</dc:creator>
    <dc:date>2023-08-23T05:08:18Z</dc:date>
    <item>
      <title>Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221218#M211</link>
      <description>&lt;P&gt;Count of Problem in each week by its category of the event type from last one month data. Its giving wrong data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch events, from:-30d&lt;BR /&gt;| filter event.kind == "DAVIS_PROBLEM"&lt;/P&gt;&lt;P&gt;| fieldsAdd open_ts = if(event.status == "ACTIVE" AND event.status_transition == "UPDATED",timestamp)&lt;BR /&gt;| filter isNotNull(open_ts)&lt;BR /&gt;| summarize&lt;BR /&gt;open = min(open_ts),&lt;BR /&gt;by:{display_id, event.category, event.name }&lt;BR /&gt;| summarize&lt;BR /&gt;count=countDistinct(display_id),&lt;BR /&gt;by:{open}&lt;/P&gt;&lt;P&gt;| summarize count = count(), by: {`1week interval` = bin(open, 7d)}&lt;BR /&gt;| sort count desc&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 11:16:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221218#M211</guid>
      <dc:creator>Bhargav_314</dc:creator>
      <dc:date>2023-08-22T11:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221263#M213</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You won't need most of the query, only this DQL.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetch events, from:-30d
| filter event.kind == "DAVIS_PROBLEM"
| summarize ProblemCount = countDistinct(display_id), by:{event.category, `1 week interval` = bin(timestamp, 7d)}
| sort ProblemCount desc&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LawrenceBarratt_3-1692714649162.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13747iAF3357B891D18FE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LawrenceBarratt_3-1692714649162.png" alt="LawrenceBarratt_3-1692714649162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 14:31:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221263#M213</guid>
      <dc:creator>LawrenceBarratt</dc:creator>
      <dc:date>2023-08-22T14:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221277#M214</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/63764"&gt;@Bhargav_314&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are actually 2 things to consider why there is a discrepancy between the "problem feed" screen and the result of your query.&lt;/P&gt;&lt;P&gt;1. We have recently added a field "dt.davis.is_duplicate" - that one should flag if a &lt;A href="https://community.dynatrace.com/t5/Alerting/Question-about-Problem-quot-MERGED-quot/m-p/116104/highlight/true#M2444" target="_blank" rel="noopener"&gt;davis problem is a merged problem or not&lt;/A&gt;. so you need to filter those out.&lt;/P&gt;&lt;P&gt;2. You don't have to filter on the timestamp of the transition to identify when a problem was opened or closed, now you can use the event.start or event.end field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope following query works for you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch events, from:-30d
| filter event.kind == "DAVIS_PROBLEM" 
| sort timestamp desc
| summarize {id = takeFirst(display_id), duplicate = takeFirst(dt.davis.is_duplicate), week =  takeFirst(formatTimestamp(toTimestamp(toLong(event.start)), format:"w")), category = takeFirst(event.category)}, by:{display_id}
| filter duplicate == false
| summarize `Problem count` =  count(), by:{`Week in year` = week, `Problem category` = category}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can also share with you that the team is currently working on a new problem feed. There it will be possible that you pin e.g. the problem count on a dashboard or notebook. With that kind of action you will be also able to see how the DQL query behind the "problem count" number in the selected timeframe looks like. But I can't give you an ETA for this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 15:56:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221277#M214</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-08-22T15:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221284#M215</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/38283"&gt;@sinisa_zubic&lt;/a&gt;&amp;nbsp;this is great!&lt;/P&gt;&lt;P&gt;Is there a way to group by more than 1 Category axis in the bar chart?&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="heybeckerj_0-1692722926967.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13750iB8E7C0E0D5CEC19D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="heybeckerj_0-1692722926967.png" alt="heybeckerj_0-1692722926967.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Right now you can only choose 1&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 16:48:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221284#M215</guid>
      <dc:creator>heybeckerj</dc:creator>
      <dc:date>2023-08-22T16:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221339#M219</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A class="" href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/47736" target="_self"&gt;&lt;SPAN class=""&gt;Lawrence,&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Counts are not matching when i match the notebooks output with problems page. Can you please check once?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 05:05:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221339#M219</guid>
      <dc:creator>Bhargav_314</dc:creator>
      <dc:date>2023-08-23T05:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221340#M220</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Sini,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Instead of the week in year can I get the start date of the week.&amp;nbsp; I was trying that but its failing. PFA screen shot for your reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bhargav&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 05:08:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221340#M220</guid>
      <dc:creator>Bhargav_314</dc:creator>
      <dc:date>2023-08-23T05:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221343#M222</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Bhargav&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;that should be the query if you want to group by the start day of the week&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch events, from:-30d
| filter event.kind == "DAVIS_PROBLEM" 
| sort timestamp desc
| summarize {id = takeFirst(display_id), duplicate = takeFirst(dt.davis.is_duplicate), open =  takeFirst(toTimestamp(toLong(event.start))), category = takeFirst(event.category)}, by:{display_id}
| filter duplicate == false
| fieldsAdd weekOf=formatTimestamp(open-duration(getDayOfWeek(open) -1 ,"d"),format:"YYYY-MM-dd")
| summarize `Problem count` =  count(), by:{weekOf, category}&lt;/LI-CODE&gt;&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 06:07:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221343#M222</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-08-23T06:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221344#M223</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/46908"&gt;@heybeckerj&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure when this will be possible. maybe&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/38485"&gt;@Philipp_Kastner&lt;/a&gt;&amp;nbsp;can answer this?&lt;/P&gt;&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 06:10:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221344#M223</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-08-23T06:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221345#M224</link>
      <description>&lt;P&gt;Hi Sini,&lt;/P&gt;&lt;P&gt;Thanks for sharing the query, there is one issue i have found, we are fetching the data from last 30 days, but results are having June month data also. Can you please check once? I have attached screen shot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 06:13:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221345#M224</guid>
      <dc:creator>Bhargav_314</dc:creator>
      <dc:date>2023-08-23T06:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221350#M225</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Bhargav,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My assumption was that in your environment the problems do not last longer than 1 week. You must have problems which have started quite some while ago. So that query does not work pretty well if you have such kind of problems since I am grouping by event start date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you group by the timestamp (update time of the event), then the result should look better&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch events, from:-30d
| filter event.kind == "DAVIS_PROBLEM" 
| sort timestamp desc
| fieldsAdd weekOf=formatTimestamp(timestamp-duration(getDayOfWeek(timestamp) -1 ,"d"),format:"YYYY-MM-dd")
| summarize {id = takeFirst(display_id), duplicate = takeFirst(dt.davis.is_duplicate),  category = takeFirst(event.category)}, by:{display_id,weekOf}
| filter duplicate == false
| summarize `Problem count` =  count(), by:{weekOf,category}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 06:53:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221350#M225</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-08-23T06:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221357#M226</link>
      <description>&lt;P&gt;Hi Sini,&lt;/P&gt;&lt;P&gt;This query looks fine, but problem counts are not matching. can you please check once ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 07:27:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221357#M226</guid>
      <dc:creator>Bhargav_314</dc:creator>
      <dc:date>2023-08-23T07:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Problem in each week by its category of the event type from last one month data</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221434#M227</link>
      <description>&lt;P&gt;Can you make sure for the timeframe to use from 00:00 to 23:59 on the problem screen so it matches the DQL query?&lt;/P&gt;&lt;P&gt;Please also note that davis problems in grail are per default stored for 35 days.&amp;nbsp;&lt;/P&gt;&lt;P&gt;by how much (relative &amp;amp; absolute) are the counts not matching?&lt;/P&gt;&lt;P&gt;Beside that I don't know what could be the issue. for me the query is working in an environment with a similar amount of problems&lt;/P&gt;&lt;P&gt;If this still does not give you the desired result,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;then please create a support ticket via&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://one.dynatrace.com/hc/en-us/requests" target="_blank" rel="noopener noreferrer"&gt;https://one.dynatrace.com/hc/en-us/requests&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;. Tech support will help you with this issue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sinisa_zubic_1-1692807532243.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13770i0D74CA3A81D50015/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sinisa_zubic_1-1692807532243.png" alt="sinisa_zubic_1-1692807532243.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 16:18:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-Problem-in-each-week-by-its-category-of-the-event-type/m-p/221434#M227</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-08-23T16:18:59Z</dc:date>
    </item>
  </channel>
</rss>

