# DQL Monthly Problems count

**URL:** <https://community.dynatrace.com/t/dql-monthly-problems-count/50068>\
**Category:** DQL\
**Tags:** dql\
**Created:** [February 3, 2025, 10:05pm UTC](https://community.dynatrace.com/t/dql-monthly-problems-count/50068 "2025-02-03T22:05:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eyad](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@Eyad](https://community.dynatrace.com/u/Eyad)\
**Post date:** [February 3, 2025, 10:05pm UTC](https://community.dynatrace.com/t/dql-monthly-problems-count/50068/1 "2025-02-03T22:05:25Z")

</div>

I create a monthly dashboard where I manually gather data on problems from the past month and compare it to previous months. I want to create a **line graph** that shows the number of problems per monthly from the 1st to the last day of the month for the **current month and the last three months**.

I started working on the DQL query but got stuck. Can someone help me complete it?

fetch dt.davis.problems, from:-4M, to:now()  
| summarize count(), by:{Month= formatTimestamp(timestamp, format:“MM”)}

---

<div class="post-metadata">

**Author:** ![Cameron-Leong](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@Cameron-Leong](https://community.dynatrace.com/u/Cameron-Leong)\
**Post date:** [February 3, 2025, 11:58pm UTC](https://community.dynatrace.com/t/dql-monthly-problems-count/50068/2 "2025-02-03T23:58:16Z")

</div>

Hello,

There is a new getMonth() function coming to DQL in the [newest SaaS release](https://docs.dynatrace.com/docs/shortlink/release-notes-saas-sprint-307#new-dql-functions). Once that’s available in your tenant, the query should be…

```markup
fetch dt.davis.problems, from:-4M, to:now()
| fieldsAdd month = getMonth(timestamp)
| summarize count(), by:{month}

```

---

<div class="post-metadata">

**Author:** ![Eyad](https://avatars.discourse-cdn.com/v4/letter/e/c57346/32.png) [@Eyad](https://community.dynatrace.com/u/Eyad)\
**Post date:** [February 4, 2025, 1:57pm UTC](https://community.dynatrace.com/t/dql-monthly-problems-count/50068/3 "2025-02-04T13:57:38Z")

</div>

Thank you!
