Description
Changes employee status.
Formula
SET CREATENONMISSINGBLK ON; VAR startIndex; VAR endIndex; VAR existingAction = #MISSING; FIX ([Scenario], [Version], [Employees], [Department], [Month], [Year], "Local", "HSP_InputValue") "Action" ( startIndex = [Month]->"Fiscal TP-Index"; endIndex = startIndex + [Duration]; IF (endIndex < startIndex) endIndex = startIndex; ENDIF ); ENDFIX FIX ([Scenario], [Version], [Employees], [Department], [Year], "Local", "HSP_InputValue") "Action" ( IF ("Fiscal TP-Index" == startIndex) "Action" = [Action]; ELSEIF ("Fiscal TP-Index" > startIndex AND "Fiscal TP-Index" < endIndex) existingAction = "Action"; "Action" = #MISSING; ELSEIF ("Fiscal TP-Index" == endIndex AND "Action" == #MISSING) IF (existingAction == #MISSING) "Action" = 1; ELSE "Action" = existingAction; ENDIF ENDIF ); CALC DIM ("Account"); ENDFIX