09 Jan 2024 05:58 AM
Hi there.
Is it possible to filter data by calendar month in DQL Notebooks? I cannot seem to find a query that I can use to filter data by previous month using calendar month. I want a dashboard that would automatically show data for the past month but from the 1st to the last day of the month. An example could be fetching the number of Davis Problems for the past month.
fetch events
| filter event.kind == "DAVIS_PROBLEM"
| summarize Total_Problems = count()
I want this to show for the previous month, each month.
09 Jan 2024 07:12 AM
Hi @Maelam
Please check this post, maybe it could help.
TIPS - DQL Timeframe selection - Dynatrace Community
I am not a DQL user unfrotunately (yet).
But maybe you can create an -1M/M based on @gbaudart post.
I hope it helps.
Best regards,
Mizső
09 Jan 2024 07:26 AM
Thanks, Mizső but I do not think that this will be useful. I want the data to always show the previous calendar month regardless of whichever day I want to run the query/report.
09 Jan 2024 09:46 PM
Hi @Maelam
I allocated some time to check it but you are right I have not found any solution yet in DQL based on the documentation and examples. So at the moment you can do this only on the Dashboard Classic (+Data Explorer) with timeframe selection -1M/M to now/M.
Best regards,
Mizső