cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a metric/widget for average cycle time of a specific case event?

rsj6178
Discoverer
0 Kudos
401

I've uploaded workflow case event and attribute data from SAP Signavio Process Governance into SAP Signavio Process Intelligence. How can do I create a metric/widget to calculate and report the average cycle time for a specific event/activity?

View Entire Topic

Hi Ryan,

a cycle time calculates the time between two events in a case. The SiGNAL code for the standard cycle time calculation looks like this:

SELECT AVG ((SELECT LAST (END_TIME)) -- timestamp of the second event, in this case the last event of a case

- (SELECT FIRST (END_TIME))) -- timestamp of the first event, in this case the first event of a case

AS "Average cycle time"

FROM THIS_PROCESS

daniel_hesseling
Product and Topic Expert
Product and Topic Expert
0 Kudos

Furthermore you can refer to the following chapter within our documentation:


https://help.sap.com/docs/signavio-process-intelligence/user-guide/custom-attributes-for-event-level...

rsj6178
Discoverer
0 Kudos

Appreciate the information. To clarify, since it can only do cycle times between two events using LAST / FIRST or vice versa, there's no way to get an average if there are multiple instances of a particular event due to rework loop?

For example, if there's a User Task Review that occurred more than once in some cases due to rework loops causing multiple instances/timestamps of the second and first events I choose, I can only utilize the LAST or FIRST end_time of each event which would affect the output result and not necessarily give me an average duration across all of them. Is that correct?

0 Kudos

Hi Ryan, not sure if I got that. In cases of rework loops, do you still want to calculate the average cycle time of that case? The default formula for cycle time looks at the LAST or FIRST event of each case (not event or instances of events). Hence the default cycle time calculation would still calculate the avg. time it takes for cases with and without rework loops

daniel_hesseling
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ryan,

If you have a more specific use case like you described it might be worth to have a look at window functions:
https://help.sap.com/docs/signavio-process-intelligence/signal-guide/window-functions?locale=en-US

With these you are able to query specific instances of an event within a case if you partition by case_id.
By first flattening the data and then only querying e.g. your specified user task you could build an average over all of them.

Best regards
Daniel