Calculate Average Turn around Time for Service Request

Mujahid Sharief
Tera Contributor

I have requirement for calculating average turn around time for on onboarding SCREQ Request completed between 28th March 22 and 27 September 22.

*It can be through reporting. Please help.

1 ACCEPTED SOLUTION

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Mujahid Sharief ,
I trust you are doing good.

To calculate the average turn around time for onboarding SCREQ requests completed between March 28th, 2022 and September 27th, 2022, we can use ServiceNow reporting functionality. Here's an example of how you can create a report to get this data:

  1. Go to the ServiceNow Reports module and create a new report.

  2. Select the table that contains the onboarding SCREQ requests, which is likely the 'sc_request' table.

  3. In the filter section, add a filter for 'Closed at' that includes the date range you specified. Here's an example filter condition:

    Closed at BETWEEN '2022-03-28'@javascript:gs.beginningOfToday()@ AND '2022-09-27'@javascript:gs.endOfToday()@

  4. Next, we need to add the columns we want to report on. To calculate the turn around time, we need to include the 'Opened at' and 'Closed at' columns. You can add these columns by clicking on the 'Add columns' button and selecting them from the available fields.

  5. To calculate the turn around time, we can add a script field to the report that subtracts the 'Opened at' value from the 'Closed at' value. Here's an example script:

 

var opened = new GlideDateTime().setString(current.opened_at); var closed = new GlideDateTime().setString(current.closed_at); var duration = gs.dateDiff(closed, opened, true); duration

 

  • Finally, we can add a summary row to the report that calculates the average turn around time. To do this, click on the 'Add summary row' button and select the 'Average' function for the turn around time column.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



View solution in original post

4 REPLIES 4

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Mujahid Sharief ,
I trust you are doing good.

To calculate the average turn around time for onboarding SCREQ requests completed between March 28th, 2022 and September 27th, 2022, we can use ServiceNow reporting functionality. Here's an example of how you can create a report to get this data:

  1. Go to the ServiceNow Reports module and create a new report.

  2. Select the table that contains the onboarding SCREQ requests, which is likely the 'sc_request' table.

  3. In the filter section, add a filter for 'Closed at' that includes the date range you specified. Here's an example filter condition:

    Closed at BETWEEN '2022-03-28'@javascript:gs.beginningOfToday()@ AND '2022-09-27'@javascript:gs.endOfToday()@

  4. Next, we need to add the columns we want to report on. To calculate the turn around time, we need to include the 'Opened at' and 'Closed at' columns. You can add these columns by clicking on the 'Add columns' button and selecting them from the available fields.

  5. To calculate the turn around time, we can add a script field to the report that subtracts the 'Opened at' value from the 'Closed at' value. Here's an example script:

 

var opened = new GlideDateTime().setString(current.opened_at); var closed = new GlideDateTime().setString(current.closed_at); var duration = gs.dateDiff(closed, opened, true); duration

 

  • Finally, we can add a summary row to the report that calculates the average turn around time. To do this, click on the 'Add summary row' button and select the 'Average' function for the turn around time column.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Hi Amit.

Please explain the add a script field in report. provide the detailed steps.

Thanks and regards

shan

 

Ya i gor ur points, but how to calculate the TAT for priority wise in incident_sla table, since based on priority we want to caluate the resolution SLA along in reports how to do that..give me any suggestions

Hello,

 

I also have been asked to generate a 6 month report to show average access requests and was trying to get the scripting added to my report.  The best I could think was to add it under "configure function field" under the Configure tab of the report but I dont know if your example would be paste there or if I have to go through and use the buttons under "add operation" to build that data.  Thanks for any reply.