Reference: Calculation Expressions
Calculation expressions enable you to perform mathematical functions on calculation columns, rows, and cells in your composite report.
Function | Description | Examples |
|---|---|---|
Difference | Subtracts the second value from the first value. | [R5]-[R3] Difference([C5],[C3]) Difference([R2C2],[R2C3]) |
Divide | Divides the first value by the second value. The second value supports cells when the first value is a column. You can select AbsRef (Absolute Reference) in the denominator to maintain the original cell reference regardless of its duplicated location on the report. Absolute Reference doesn't support nesting calculations and doesn’t convert a negative value to a positive value.Workday defaults the third parameter, Return Zero on Error , to true unless you specifically set it to false.You can divide by a constant value with up to 10 digits. You can't divide by:
| Divide([C3],[C5]) Divide([C3],10) Divide([R3],[C5],true) Divide([C3],[C5],false) Divide([C3],[R3C5]) [C3]/1234567890 Divide([R1C2],AbsRef([R2C2])) [R2C3]/AbsRef([R2C4]) |
Multiply | Multiplies 2 values. You can multiply by:
You can't multiply by zero. | Multiply([C3],[C3]) Multiply([R3],[R4])*[R5]) Multiply([C3],1.04) Multiply([C3],123456789012) Multiply([C3],10) [R3]*[R4]*[R5] [C3]*0.123456 Multiply([R3C2],[R3C3]) |
PercentIncrease | Returns the difference in percentage of the first value from the second value. Workday defaults the third parameter, Return Zero on Error , to true unless you specifically set it to false. | PercentIncrease([R3],[R5]) , where Workday calculates the formula as ([R5]-[R3])/[R5]PercentIncrease([C3],[C5],true) PercentIncrease([R3],[R5],false) PercentIncrease([R1C2],[R1C3]) , where Workday calculates the formula as ([R1C3]-[R1C2])/[R1C2]. |
PercentRemaining | Returns the percentage remaining after dividing the second value by the first value. Workday defaults the third parameter, Return Zero on Error , to true unless you specifically set it to false. | PercentRemaining([R3],[R5]) , where Workday calculates the formula as ([R5]-[R3])/[R5]PercentRemaining([C3],[C5],true) PercentRemaining([R3],[R5],false) PercentRemaining([R1C2],[R1C3]) , where Workday calculates the formula as ([R1C3]-[R1C2])/[R1C3] |
Sum | Returns the sum of multiple values. | Sum([R2],[R3],[R5]) Sum([C5]) [R2]+[R3]+[R4]+[R5]+[R6]+[R7] Sum([R1C2],[R1C3],[R1C4]) |
SumRange | (Not supported for cells.) Returns the sum of all columns, from the first column to the last column. The first column must precede the last column in the table. | SumRange([C3],[C5]) SumRange([R2],[R9]) |
Considerations
You can nest up to 5 functions in 1 expression.
Workday uses the standard order of operations rule, known as PEMDAS, for mathematical expressions:
- Parentheses
- Exponents
- Multiplication
- Division
- Addition
- Subtraction
Workday reads functions from left to right. Example: In the expression
[C3]/[C2]*[C3]
, Workday divides, then multiplies the values. However, if the expression is [C3]/([C2]*[C3])
, then Workday multiplies the values in parentheses, then divides.