Dan Munns Posted August 3, 2017 Share Posted August 3, 2017 Hi all, I am trying to create a couple of widgets without much success. I need to know how many tickets we resolved last month per team and how many have been resolved so far this month per team. I have the following statement: (h_requesttype = 'Service Request' OR h_requesttype = 'Incident') AND (h_dateresolved >= LAST_DAY(NOW() - INTERVAL 1 MONTH) + INTERVAL 1 DAY) AND (h_resolvedby_teamname = ' IT Service Desk) But although it shows resolved tickets this month overall (if I remove the (h_resolvedby_teamname = ' IT Service Desk)) I cant get it to show per team. I also cant work out the statement required to show last months numbers for anything. I thought I would be clever and change the interval to 2 MONTH but as you imagine it just adds the last months numbers to the current months numbers (I should have guessed) Any help appreciated Thanks Dan Link to comment Share on other sites More sharing options...
Dan Munns Posted August 3, 2017 Author Share Posted August 3, 2017 Ok so I cleaned my glasses and saw the leading space in the team name so have now sorted that "facepalm" However I still cant work out how to get it to show me only numbers from the last full month. Link to comment Share on other sites More sharing options...
Guest Posted August 3, 2017 Share Posted August 3, 2017 Hi @Dan Munns In terms of last months requests, try this: (h_requesttype = 'Service Request' OR h_requesttype = 'Incident') AND (h_dateresolved >= LAST_DAY(NOW() - INTERVAL 2 MONTH) + INTERVAL 1 DAY) AND (h_dateresolved < LAST_DAY(NOW() - INTERVAL 1 MONTH)) AND (h_resolvedby_teamname = 'IT Service Desk) Does this work for you? Kind Regards Bob Link to comment Share on other sites More sharing options...
Dan Munns Posted August 4, 2017 Author Share Posted August 4, 2017 @Bob Dickinson like a charm. Thank you very much. Dan Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now