# DQL Monthly Query for problems

**URL:** <https://community.dynatrace.com/t/dql-monthly-query-for-problems/50494>\
**Category:** DQL\
**Tags:** dql\
**Created:** [February 27, 2025, 7:41pm UTC](https://community.dynatrace.com/t/dql-monthly-query-for-problems/50494 "2025-02-27T19:41:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [February 27, 2025, 8:01pm UTC](https://community.dynatrace.com/t/dql-monthly-query-for-problems/50494/2 "2025-02-27T20:01:47Z")

</div>

Try putting the year first, and you don’t need to do the join.

fetch dt.davis.problems  
| summarize TotalProblemMonthly=count(),  
ServiceNowTickets=countIf(matchesPhrase(labels.alerting\_profile, “ServiceNow”)),  
by:{Month = formatTimestamp(timestamp, format: “yyyy-MM”)}  
| sort Month desc

---

_[View the full topic](https://community.dynatrace.com/t/dql-monthly-query-for-problems/50494)._
