CALC_REWORK counts the number of activities per case. A filter expression can be specified to restrict the activities that should be taken into account. The result is an INT column in which the value of each row gives the number of activities for the respective case ID. The resulting column is temporarily added to the case table.
CALC_REWORK ()
CALC_REWORK ( filter_condition )
CALC_REWORK ( activity_table.column )
CALC_REWORK ( filter_condition , activity_table.column )
filter_condition: All activities that match the filter condition will be counted.
activity_table.column: A column of an activity table. This can be used to specify the event log that should be used if multiple event logs are contained in the data model.
NULL values are in general not relevant for the calculation since CALC_REWORK counts how often a CASE_ID appears. However, if a case does not have a join partner in the case table, it will be ignored. If there is a NULL case id in the case table, it will be taken over into the result table. However, the result for it will be 0 since NULL cases are not joined.