Jump to content
dwalby

Monthly Measures Result discrepancies

Recommended Posts

Hi all,

Each month we're required to produce KPI statistics for the following monthly key service desk metrics:

  • No. of Incidents & Service Requests Logged
  • No. of Incidents & Service Requests Resolved
  • No. of Open Incidents & Service Requests (Recorded as of the last day, hour, minute of the month)

The problem I'm having is getting the number of open Incidents & Service Requests to correlate with the number logged and resolved. The results circled in red are those from April 2018 - unless my logic is incorrect the number of open Incidents and Service Requests for April should be: 

INC/SR - No. Open Per Month (End of March) = 652
+ INC/SR - No. Logged Per Month (April) = 1788
- INC/SR - No. Resolved Per Month TEST (April) = 1807

TOTAL = 633 

But as you can see the INC/SR - No. Open Per Month (End of April) is showing as 657.

image.thumb.png.a9de13af2d7624cf447d5eda1c4cbc1d.png

I've included some screenshots of the measures as they're currently setup. Does anyone have any suggestions or advice on how to troubleshoot this?

image.thumb.png.5c49ee8959ed06fcbec94fde45781e0a.png

image.thumb.png.7bf43fc9d7389f3e62d7cdf7974cdffc.png

image.thumb.png.8b44b05cb616899f697dd3faca36d27b.png

 

Also, if I create a view within the request list to show all open incidents and service requests, the total open count this morning is showing 650 despite nothing being resolved between 30/04/18 11:59PM (when the measure finished) and now... So there's 7 incidents or services requests missing from the count captured in the measure.

So I've got 3 separate counts for open incidents and service requests:

633 by my calculations
657 by the No. of Open Incidents & Service Requests
650 by a custom view within the request list

 

Any help would be appreciated

Share this post


Link to post
Share on other sites

@dwalby a couple of thoughts

1. The measure is looking at all requests in the database that meets your requirements, when you create a request list view via the user app, it will only return results on the requests you have the rights to view - so just checking that there are not teams / services you are not a member of, or maybe requests which are not assigned to any team / service - not saying this is the issue but maybe worth ruling out?

2. In your date resolved example is it possible you have had any requests which have been re-opened once resolved? so back in an open status? maybe include additional clause to say status is resolved closed?

Just some thoughts 

Steve

Share this post


Link to post
Share on other sites

@Steven Boardman I've amended the INC/SRs resolved per month to the below:

image.png.13c82f62c77b21b3f3e8909d1cd27c0a.png

But now the results are returning the same value each month. I thought this would return no. closed calls in April, March, etc. with different values?

image.png.3efccba77e0b41e19d134d61c4bd6fd2.png

Share this post


Link to post
Share on other sites

@dwalby yes i would expect the actual results per month as well (as i seeing on my instance) - i'll have to ask @Victor to assist as i don't have access to instances

  • Like 1

Share this post


Link to post
Share on other sites

@dwalby I'll have a look. As Steven mentioned above most likely I will have to look at the configurations in your instance. Let me know if ok or not ok for me to do so :)

Share this post


Link to post
Share on other sites

@dwalby yes, sorry for the delay.... the numbers from your measures don't make much sense (for me)... I mean they are not right from what I can see... I need to investigate this a bit more....

EDIT: right, the issue lays with the "Query where clause" ... that needs to be put in brackets because the SELECT statement that does the counting for each month has some inherent criteria on which it adds whatever criteria is in "where clause" on measure configuration... is al about how OR and AND operator precedence works... Basically without brackets you are not counting everything that matches "closed date in that month and request type is incident" OR "request type is service request" ...as it is now, you are basically counting service requests (all SR that currently exist in your instance) plus incidents closed in the month... for each month... what it should count is "closed date in that month" AND ("request type is incident" OR "request type is service request"). The brackets will achieve this. Alternatively, in the where clause use this: h_requesttype IN ("Incident", "Service Request")

image.png

or

image.png

Share this post


Link to post
Share on other sites

@dwalby by the way .. the above advice (brackets) applies for all measures where you have a WHERE clause comprised on more than one criterion... best to put these in brackets to make sure they are treated in addition to whatever inherent criteria the measure has...

Share this post


Link to post
Share on other sites

Would it be more efficient for the query builder to add brackets around the Query where clause for every measure?
It's not going to break anything and would assist those users who are not as familiar with SQL and precedence.

Share this post


Link to post
Share on other sites
2 hours ago, DeadMeatGF said:

Would it be more efficient for the query builder to add brackets around the Query where clause for every measure?

I am sure it would...

Share this post


Link to post
Share on other sites

@Victor - OK so  after re-sampling the number of requests logged for April has gone from 1788 down to 892. Just to confirm I'm understanding it right, that is because previously it was calculating ALL Incidents (Ever logged?) + Service Requests logged in the month?

On 5/8/2018 at 4:20 PM, Victor said:

@dwalby yes, sorry for the delay.... the numbers from your measures don't make much sense (for me)... I mean they are not right from what I can see... I need to investigate this a bit more....

EDIT: right, the issue lays with the "Query where clause" ... that needs to be put in brackets because the SELECT statement that does the counting for each month has some inherent criteria on which it adds whatever criteria is in "where clause" on measure configuration... is al about how OR and AND operator precedence works... Basically without brackets you are not counting everything that matches "closed date in that month and request type is incident" OR "request type is service request" ...as it is now, you are basically counting service requests (all SR that currently exist in your instance) plus incidents closed in the month... for each month... what it should count is "closed date in that month" AND ("request type is incident" OR "request type is service request"). The brackets will achieve this. Alternatively, in the where clause use this: h_requesttype IN ("Incident", "Service Request")

image.png

or

image.png

 

Share this post


Link to post
Share on other sites
Just now, dwalby said:

Just to confirm I'm understanding it right, that is because previously it was calculating ALL Incidents (Ever logged?) + Service Requests logged in the month?

Almost... :D  ... it was calculating ALL Service Requests (ever logged) + Incidents closed that month.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×