ACTIVITY_LAG
Applies to: CELONIS 4.6
Description
ACTIVITY_LAG returns the activity from the row that precedes the current activity by offset number of rows within a case. Null activities are skipped.
Syntax
ACTIVITY_LAG ( table.column [, offset ] )
column: String column which has to be joinable to the activity table.
offset: The number of non-NULL activities preceding the current activity. The default value is 1.
Examples
[1] Simple example for ACTIVITY_LAG returning the previous activity within a case. If activity has no previous activity, NULL is returned.
|
[2] Example for ACTIVITY_LAG with offset = 2. ACTIVITY_LAG returns the activity from the row that precedes the current activity by 2 rows within a case.
|
[3] Null activities are skipped for calculation of ACTIVITY_LAG.
|
[4] ACTIVITY_LAG can be used for identifying activities causing errors. It is assumed that activities directly followed by an error activity is defined as error causing activity. For identification of these activities, the error activities are set to NULL within the CASE WHEN statement in the first step. Next, ACTIVITY_LAG is used to find the preceding activity that is not NULL. By applying the FILTER statement, only preceding activities of error activities are kept in the resulting table.
|