ACTIVITY is NOT followed by ACTIVITY2 or by ACTIVITY3 - how to check?


#1

Hello everyone,

I would like to create a KPI that counts the cases, where some ACTIVITY1 is NOT followed by ACTIVITY2 or by ACTIVITY3.
Let’s says it is like in the court: there is a case upon which it sould be decided (ACTIVITY 1 would be ‘The case is on the table of the judge’). The decision is either YES or NO and I want to know how many cases are still awaiting a decision. I can’t really use the COUNT(PU_LAST(TABLE, MATCH_ACTIVITIES(ENDING[‘ACTIVITY1’] ) =1)) bacause it some events in between can happen, for example the judge would like an assistant to get some additional info to make a decision, while the case is still on her/his table. Any ideas?

Best regards


#3

If you want to filter out cases in which activity ‘A’ occurs and is followed by activity ‘B’, please use the PROCESS EQUALS statement:

COUNT(
CASE WHEN PROCESS EQUALS ‘A’ TO ANY TO ‘B’ THEN NULL
ELSE 1.0 END
)

Best regards,
Kerstin


#4

Thank you. I had this idea myself. Unfortunatelly, in my process the ACTIVITY1, ACTIVITY2 and ACTIVITY3 can occure multiple times, hence if I use the formula:

ALL CASES-CASES( with ACTIVITY1+ACTIVITY2)-CASES(with ACTIVITY1 and ACTIVITY3)-CASES(without ACTIVITY1)

I am automatically sorting out the cases where the ACTIVITY1 was followed by ACTIVITY2 or ACTIVITY3 and than ACTIVITY1 occured again but was not followed by ACTIVITY2 or ACTIVITY3 . So your solution doesn’t really solve my Problem.


#5

Okay, thanks for your explanation. I think the problem is a little bit clearer to me now.
Please, try the following solutions:
FILTER PU_COUNT(“CASE”, CALC_CROP(LAST_OCCURRENCE [ ‘A’ ] TO LAST_OCCURRENCE [‘B’], Activity.“ACTIVITY”)) = 0;