How to calculate average of time

Vasanth Pandia1
Tera Contributor

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

1 ACCEPTED SOLUTION

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.

View solution in original post

10 REPLIES 10

Vasanth Pandia1
Tera Contributor

Hi All,

 

Our Client is not interested to create a timestamp field or go for metrics. They just need to calculate the duration of time spent in each state of a request via Performance analytics.

Is there a way where we can calculate the time spent on each state?

Regards,

Vasanth

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.

Hi Denis,

 

I am looking for the same requirement how did you achieve this use-case, can you please post the PA indicator & metric snapshot for reference.

 

Thanks in advance for your help

Vasanth Pandia1
Tera Contributor

Hi All,

 

Thanks for all your help.

Finally we have decided to go ahead with a timestamp field which gives us a the duration when the record moves to the particular state. since as of now we need only for one particular state. when we need the time for all states, we will go ahead with Metric Definitions.

 

Regards,

Vasanth

Hi Vasu,

 

I am looking for the same requirement how did you achieve this use-case, can you please post the PA indicator & metric snapshots

 

Thanks in advance for your help