Skip to main content

PQL46 (PQL Function Library - CPM 4.6)

CALC_REWORK

Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6

Description

CALC_REWORK counts the number of activities per case. Which activities CALC_REWORK should take into account can be restricted by a filter.

Syntax
CALC_REWORK ( [ FILTER | table.column | FILTER , table.column ] )
  • table.column: Column which has to be joinable to an activity table (Since: CELONIS 4.6).

Examples

[1] Example for CALC_REWORK on 3 cases without filter.

Query

Column1

CALC_REWORK ( )

Input

Output

Activities

CASE_ID : STRING

ACTIVITY : STRING

TIMESTAMP : DATE

'1'

'A'

Tue Jan 01 2019 13:00:00.000

'2'

'B'

Tue Jan 01 2019 13:01:00.000

'2'

'C'

Tue Jan 01 2019 13:02:00.000

'2'

'D'

Tue Jan 01 2019 13:03:00.000

'3'

'A'

Tue Jan 01 2019 13:04:00.000

'3'

'A'

Tue Jan 01 2019 13:05:00.000

Result

Column1 : INT

1

3

2

[2] Example for CALC_REWORK with filter on activity C and E.

Query

Column1

CALC_REWORK(Table1.ACTIVITY = 'C' OR Table1.ACTIVITY = 'E')

Input

Output

Activities

CASE_ID : STRING

ACTIVITY : STRING

TIMESTAMP : DATE

'1'

'A'

Tue Jan 01 2019 13:00:00.000

'2'

'B'

Tue Jan 01 2019 13:01:00.000

'2'

'B'

Tue Jan 01 2019 13:02:00.000

'2'

'C'

Tue Jan 01 2019 13:03:00.000

'3'

'D'

Tue Jan 01 2019 13:04:00.000

'3'

'E'

Tue Jan 01 2019 13:05:00.000

Result

Column1 : INT

0

2

0