Calculate throughput from one activity to another


Hello everyone,
I am having a process in a form Activity1->Activity2->Activity2->Activity3->Activity4->Activity2->Activity2->Activity4
and interested in calculating the days between the Activity3 and the first Activity2 that happens after Activity3, i.e. in the throughput time between positions (4) and (6). Any ideas how to implement it?

Thank you!



I have not run the full check, however I believe following formula should work:
PU_FIRST(“case”,“events”.“date”,“events”.“activity” = “Activity3”),
PU_FIRST(“case”,“events”.“date”,“events”.“activity” = “Activity2” AND
CALC_CROP(FIRST_OCCURRENCE[‘Activity3’] TO LAST_OCCURRENCE[‘Activity4’], “activity”) = 1)


the answer from works. I only needed to adjust the quotation marks (to single quotation marks when referencing a string like ‘Activitiy3’). My full answer looks then like this. I also inserted CASE_END to CALC_CROP to generalize the answer.

PU_FIRST("Activities_CASES","Activities"."Date","Activities"."Activity" = 'Activity3'),
PU_FIRST("Activities_CASES","Activities"."Date","Activities"."Activity" = 'Activity2' AND
CALC_CROP(FIRST_OCCURRENCE['Activity3'] TO CASE_END,"Activities"."Activity") = 1)

Kind regards,


Thank you very much, it works perfectly!