Concept: Step-Based Calculation
Step-based calculations return a single numeric value. You can use them in scenarios involving complex logic such as nested calculation flows.
Operations
Within each step, you can specify any number of operations that Workday executes sequentially. For each operation, you can also specify how you want to provide the value. Example: Using a calculation or numeric value.
Operation | Description |
|---|---|
Add | Adds the value that you specify to the prior value. |
Divide | Divides the prior value by the value that you specify. |
Exit | Exits the calculation with either:
|
Max | Returns the maximum of all specified values. When you select Calculation from the Type prompt, you can configure Workday to ignore the prior value in the comparison. To do so, select the Exclude Prior Value check box. |
Min | Returns the minimum of all specified values. When you select Calculation from the Type prompt, you can configure Workday to ignore the prior value in the comparison. To do so, select the Exclude Prior Value check box. |
Multiply | Multiplies the prior value by the value that you specify. |
Power | Applies a power operator to the Value in the preceding row. |
Round | Enables you to specify a rounding option. |
Set | Initializes a starting value, typically at the beginning of the calculation. When you don't set an initial value, Workday starts the calculation with the value zero. You can use the set operation to reinitialize the previous prior value. |
Subtract | Subtracts the value that you specify from the prior value. |
- Example: Set
- Set the initial value to 100.OperationTypeValueSetNumeric100
- Example: Multiply
- Multiply the prior value by the value of a monthly transportation subscription, which you store in an advanced lookup table.OperationTypeValue - Lookup TableValue - ColumnValue - Period Date IndicatorMultiplyLookup TableTransportation subscription allowanceMonthlyBased on Payment Date
- Example: Power
- Add a power operator to the preceding value for Set of 2.OperationTypeValueSetNumeric2PowerNumeric0.5The calculation returns 1.4142.
- Example: Min
- Return the minimum between the prior value, the worker's age, and 15 years.OperationTypeValueMinCalculation15Worker age
- Example: Exit
- Exit the calculation with a result of the prior value.OperationTypeExitPrior Value
- Example: Add
- Add the age of the worker as of the end of the period.OperationTypeValue – Start Date TypeValue – Start Date CalculationValue – End Date TypeValue – End Date CalculationValue ReturnedAddDate DifferenceCalculationWorker: Hire DateCalculationPeriod: Period End DateYear
Conditions
You can specify a condition to control if Workday should resolve a step or not.
You can copy step-based conditions by selecting Condition > Copy from the related actions menu of the condition.
- Example: Prior Value <= 1500
- You want the step to resolve only when the prior value inherited from the previous step is less than or equal to 1500.Operand 1OperatorOperand 2Prior Valueis less than or equal toCalculation> 1,500
- Example: Worker Hire Date >= Period Start Date
- You want the step to resolve only when the worker's hire date is greater than or equal to the period start date.Operand 1OperatorOperand 2Calculation>Worker Hire Dategreater than or equal toCalculation>Period: Period Start Date
- Worker Years of Service > 20 (at end of period) AND Worker Hire Date Month = Month of Period
- You want the step to resolve only when both the worker's:
- Start date is greater than 20 years by the period end date.
- Hire date month is the same month of the period end date.
Logical Operator=ANDOperand 1OperatorOperand 2Type:Date DifferenceStart Date Type:CalculationStart Date Calculation:Worker: Hire DateEnd Date Type:CalculationEnd Date Calculation:Period: Period End DateValue Returned:Yeargreater thanType:NumericValue:20Type:Date ExtractDate Calculation:Worker: Hire DateValue Returned:Monthequal toType:Date ExtractDate Calculation:Period: Period End DateValue Returned:Month
- Condition Groups
- You can specify the order of conditions when there are multiple rows of conditions.
- Example: Extra Hours Based on PTO Balance
- You want to give workers with the least amount of personal time off (PTO) balance some extra hours. Workers with larger PTO balances get fewer extra hours. You set up this step-based calculation:StepCondition GroupConditionOperationTypeValue1SetCalculationCurrent PTO balance (hours)AddCalculationPTO (Position Based) PlanRoundRounding DefinitionRound down to nearest 12.1Prior Value Condition GroupPrior Value < = 100AddNumeric252.2Prior Value Condition GroupPrior Value < = 200AddNumeric152.3Prior Value Condition GroupPrior Value < = 300AddNumeric102.4Prior Value Condition GroupPrior Value > 300AddNumeric5
- Workday evaluates the steps based on the step order. A worker who has less than 100 receives 25 extra hours. A worker who has more than 300 receives 5 extra hours.