- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2018 04:32 AM
Hi All,
I have a requirement to calculate "Average time spent for a request from when the record was created until the request is accepted or rejected".
Please let me know how to calculate the average time, I need to use this in Performance Analytics.
Regards,
Vasanth
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2018 10:20 AM
Vasanth, this is exactly what metrics is for. You need to configure a metric on the request table for field duration on the state field, and then you can configure an indicator in PA to collect the durations of those metrics, doing whatever calculations you want on them. (For an average, you'd divide the sum of all of the times collected by the number of records collected.)
You have to understand that PA by itself can't go back in time to figure out when something happened if the timestamps of those events aren't recorded; it can only do calculations based on the current state of records as of the time the collector runs. If you want historical data, you have to record that data in some way, which means you're going to have to either record a timestamp on the records themselves or use metrics to collect the data that can be rolled up in PA.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2018 04:41 AM
Hi,
How you decide it is accepted or rejected? Via Approvals?
Thanks,
Ashutosh Munot
Please Hit ✅Correct, ⭐️Helpful depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2018 08:33 AM
Do you have a timestamp on the record that records when it is accepted or rejected? That may be a good idea to add to make this simple. If not, you'll need to configure some metrics to help you here. Then PA will be run on top of that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2018 09:43 AM
I would suggest adding a field to your request and using a business rule to timestamp it when the approval is processed (accepted or rejected).
Then coming up with an average time is pretty simple, just create two automated indicators; one for the number of processed requests (requests which have the approval processing time field set to some non-null value), and one for the total time it took to process the approvals for each request (the sum of the processing timestamp - created timestamp fields). Then create a formula indicator that divides the latter by the former to get the average.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2018 09:51 PM
Thanks everyone. I will try out these ways and reach out to you, If I face any difficulties.
Regards,
Vasanth