Calculate throughput from one activity to another


#1

Hello everyone,
I am having a process in a form Activity1->Activity2->Activity2->Activity3->Activity4->Activity2->Activity2->Activity4
(1)-----------(2)-----------(3)----------(4)------------(5)--------(6)-------------(7)----------(8)
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!


#3

Hi.

I have not run the full check, however I believe following formula should work:
DAYS_BETWEEN(
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)
)


#4

Hi,
the answer from nicks.si 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.

DAYS_BETWEEN(
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,
Max


#6

Thank you very much, it works perfectly!