Reports @Created Filter customization
Any way to get Last Month in the list of options for the @createdFilter? Also a Date Range would be handy.
Best Answer
-
Shane_White Cireson Support Super IT Monkey ✭✭✭✭✭
I do not believe there is a way to edit the @createdFilter to include more options (Could be wrong)
But if you wanted to do a specific SQL Query that showed the last month you could try this:
Select *
From Dbo.WorkItem
WHERE DATEPART(m, created) = DATEPART(m, DATEADD(m, -1, getdate()))
I know in the past custom pages have been built where depending on your selection from drop downs it would populate the information so this could be something bigger to look into if you want to have a choice.
Let me know if this helps.
Shane
5
Answers
Hi @Brian_Winter
I do not believe there is a way to edit the @createdFilter to include more options (Could be wrong)
But if you wanted to do a specific SQL Query that showed the last month you could try this:
Select *
From Dbo.WorkItem
WHERE DATEPART(m, created) = DATEPART(m, DATEADD(m, -1, getdate()))
I know in the past custom pages have been built where depending on your selection from drop downs it would populate the information so this could be something bigger to look into if you want to have a choice.
Let me know if this helps.
Shane
Yes, that helps and I actually use something like that to limit the result set to one full calendar year.
However, since management needed a dynamic date range, we were driven to Power BI. We can take the same queries (roughly speaking) and add a Date Range filter. This lets management pull up what they need.
I had once toyed with the idea of presenting a form with Start and End Date fields and then calling the reports with URL parameters. But too much time and too many challenges. Power BI took only a few hours.
You could raise a Feature Request for the idea of adding filters to the @createdFilter feature?
But that makes sense, hopefully that will keep you going with what you need for the time being!