Skip to main content

Hi.

Is there a way to calculate the average time taken to complete an activity or event. The time would be based on the timestamp of the event in question and the event that follows. This needs to be as a KPI so that is can be applied to large event data sets

 

Eg

Event A ----Event B ----Event C

|_______Event D

So the average time for Event B would be the average of Event c and Event D subtracted from event B.

The ask is to display it in an OLAP table as follows:

 

Column1 Column 2

Event Name Average time taken in mins

Hello Zaakir! I believe you are trying to determine the time between an activity and the end of the case's process. You can use MINUTES_BETWEEN and PU_LAST to find the time in minutes between the current activity and the final activity in the case:

 

SUM(

 MINUTES_BETWEEN (

  "CELONIS_ACTIVITIES"."EVENTTIME"

  , PU_LAST ( "CELONIS_CASES" , "CELONIS_ACTIVITIES"."EVENTTIME" )

 )

)

 

Your question doesn't mention the case, so if you are looking for overall throughput for each activity for the entire process model, you may want to use the standard AVG(CALC_THROUGHPUT(OStart Activity] TO iStop Activity])) type of logic you can find in the Standard KPIs.


Hello Zaakir! I believe you are trying to determine the time between an activity and the end of the case's process. You can use MINUTES_BETWEEN and PU_LAST to find the time in minutes between the current activity and the final activity in the case:

 

SUM(

 MINUTES_BETWEEN (

  "CELONIS_ACTIVITIES"."EVENTTIME"

  , PU_LAST ( "CELONIS_CASES" , "CELONIS_ACTIVITIES"."EVENTTIME" )

 )

)

 

Your question doesn't mention the case, so if you are looking for overall throughput for each activity for the entire process model, you may want to use the standard AVG(CALC_THROUGHPUT(OStart Activity] TO iStop Activity])) type of logic you can find in the Standard KPIs.

Hi Chris.

I think the second part sounds more like what I am after.

The I guess the tricky part is eliminating the manual input in the KPI as it will be too complicated and time consuming to enter for each activity.

 

Basically the KPI should tell what the average throughput for each activity is without having to input the start activities.

 


I think the answer is right in front of us - simply change the SUM(MINUTES_BETWEEN to AVG(MINUTES_BETWEEN and I believe that will yield the result you are looking for across the entire data model.


I think the answer is right in front of us - simply change the SUM(MINUTES_BETWEEN to AVG(MINUTES_BETWEEN and I believe that will yield the result you are looking for across the entire data model.

Hi Chris

 

Correct me if I'm wrong but the solution above will determine the time between the activity and the process end?


Hi Chris

 

Correct me if I'm wrong but the solution above will determine the time between the activity and the process end?

Correct, the activity and end. You specifically asked about subtracting the next-through-end from the current activity (B, for example). That would be a different calculation but typically I calculate throughput in the manner provided.


Hi Chris

 

Correct me if I'm wrong but the solution above will determine the time between the activity and the process end?

Sorry maybe my initial question wasn't clear. I need to calculate the average time for each activity, so between activities not the process end. But it has to be displayed in a table without having to input the activities. i have attached an image for an example of what is needed.

image


Hi Chris

 

Correct me if I'm wrong but the solution above will determine the time between the activity and the process end?

Ok you could use AVG(MINUTES_BETWEEN(PU_FIRST(), eventtime)) to get the time from process start to the current activity. Or, if you are looking for the time in minutes between the current and and previous activity, check into the ACTIVITY_LAG() function. ACTIVITY_LAG() is a specialized version of LAG(), so if you need to do more complex things then you may need LAG().


Reply