Skip to main content
I would like create a single KPI that uses a conditional count. This KPI should display the count of the number of cases within a process that has a duration < 60 days between two specific events.

Hello,

 

I think this one should solve the problem, please note that I've used Last to First occurrence reference - you can specify 3 options for that:

 

  • FIRST_OCCURRENCEC'activity']: Throughput time starts at the first occurrence of the specified activity type.
  • LAST_OCCURRENCEC'activity']: Throughput time starts at the last occurrence of the specified activity type.
  • CASE_START: Throughput time starts at the first activity of the case.

 

PQL:

 

SUM (

   CASE WHEN CALC_THROUGHPUT (

       LAST_OCCURRENCE S 'Activity1' ]

       TO

       FIRST_OCCURRENCE   'Activity2' ] ,

       REMAP_TIMESTAMPS ( "ACTIVITIES"."EVENTTIME" , DAYS )

   ) < 60 THEN 1.0 ELSE 0.0 END)

 

In order to have a ratio you probably need to replace SUM() with AVG().

 

Best Regards,

Mateusz Dudek


Reply