Skip to main content

Celonis Product Documentation

INDEX_ACTIVITY_LOOP_REVERSE
Description

The INDEX_ACTIVITY_LOOP_REVERSE operator returns how many times every activity has occurred in direct succession in every case in reverse order.

Syntax
  INDEX_ACTIVITY_LOOP_REVERSE ( activity_table.column )
 
  • activity_table.column: A column of an activity table. Usually, the activity column of an activity table is used.

NULL handling

NULL values are ignored, meaning that rows with a NULL value stay NULL in the result column and will not count as an index activity value.

Result

The result is an INT column that is based on the activity table. In the resulting column there is a number x for every activity in every case, that shows this is the xth occurrence of this particular activity in direct succession within that case in reverse order.

Parallel Processes

Activities in parallel processes will get an index activity loop count with respect to the absolute reverse order, based on the timestamp of the activity.

Example

[1]

In this example, case 1 contains a loop of three A-activities. Inside this loop, all activities are indexed accordingly in reverse order. Case 2 contains a loop of three B-activities, therefore indices 3-2-1 are assigned. All other activities get index 1 since they are not part of an activity loop:

Query

Column1

         INDEX_ACTIVITY_LOOP_REVERSE ( "Activities"."ACTIVITY" )
        

Input

Output

Activities

CASE : int

ACTIVITY : string

TIMESTAMP : date

1

'A'

Tue Jan 01 2019 13:00:00.000

1

'B'

Tue Jan 01 2019 13:01:00.000

1

'A'

Tue Jan 01 2019 13:02:00.000

1

'A'

Tue Jan 01 2019 13:03:00.000

1

'A'

Tue Jan 01 2019 13:04:00.000

2

'A'

Tue Jan 01 2019 13:05:00.000

2

'B'

Tue Jan 01 2019 13:06:00.000

2

'B'

Tue Jan 01 2019 13:07:00.000

2

'B'

Tue Jan 01 2019 13:08:00.000

2

'C'

Tue Jan 01 2019 13:09:00.000

Result

Column1 : int

1

1

3

2

1

1

3

2

1

1

See also: