Skip to main content

Hello All,

 

I have a scenario where i need to calculate the time between one activity and the Previous activity.

 

I have an activity Maintenance Rejected and it can happen once, twice or more than that for a case.

 

Irrespective of the number of occurrences. I should always calculate the time difference between the Maintenance rejected activity and the previous activity.

 

We have only option to take first occurence or last occurence.Is there a possible way to achieve this.

 

Request you to kindly share your expert opinion on this.

 

 

image 

Thanks ,

Saravanan.G

 

 

 

Use ACTIVITY_LEAD or ACTIVITY_LAG to identify the previous or next activity and use it in the CALC_THROUGHPUT or DATEDIFF

 

HTH


Hi @saravanan.gopal ,

 

Please check these PQL examples - use ACTIVITY_LAG() to get the activity(or timestamp) that happens before the maintenance rejected activity

https://docs.celonis.com/en/throughput-times.html

https://docs.celonis.com/en/calculations-on-activity-sequences.html


Use ACTIVITY_LEAD or ACTIVITY_LAG to identify the previous or next activity and use it in the CALC_THROUGHPUT or DATEDIFF

 

HTH

Thanks for the reply.Its working


Hi @saravanan.gopal ,

 

Please check these PQL examples - use ACTIVITY_LAG() to get the activity(or timestamp) that happens before the maintenance rejected activity

https://docs.celonis.com/en/throughput-times.html

https://docs.celonis.com/en/calculations-on-activity-sequences.html

Thanks for the reply. It's working.


Reply