Reference: Calculations and Calculated Fields Comparison
Several functions in calculations and calculated fields are similar, but have some differences.
Calculations and calculated fields are separate frameworks. You can't interchange them.
For calculations:
- Workday organizes and secures calculations through an assigned category, which determines which Workday product the calculations apply to.
- Workday accesses report field data through instance value calculations, instance set comparison calculations, and advanced lookup tables.
For calculated fields:
- Workday builds calculated fields around an assigned business object.
- Workday accesses data through report fields on the business object or calculated fields.
Comparison
This section compares calculations and calculated fields that have similar functions to help you understand their differences.
- Arithmetic Calculations
- FunctionDescriptionConsiderationsArithmetic calculationPerforms functions between only 2 values.You can only perform 1 operation between 2 operands with an arithmetic calculation. For multiple operations, you can create multiple calculations nested within one another.The arithmetic calculation supports these operators:
- Add
- Divide
- Multiply
- Subtract
If you don't specify rounding, Workday automatically rounds the result to the nearest 1/100th (.01).Arithmetic Calculation calculated fieldReturns the calculation of multiple values.You can use arithmetic calculation to perform these calculations:- Add
- Divide
- Multiply
- Subtract
The calculated field:- Can manage more than 2 values.
- Enables you to use parentheses.
- Enables you to specify the currency code.
- Returns zero on error.
Step-Based calculationReturns a single numeric value that's the outcome of a series of calculations done in steps.You can define conditions and condition groups for each step.Available operations are:- Add
- Divide
- Exit
- Max
- Min
- Multiply
- Round
- Set
- Subtract
- Build a Date
- FunctionDescriptionConsiderationsBuild Date calculationCreates a new date by combining a year, month, and day.The year month and days values are constant values. To extract the values from a date in the Workday, you can create a date extract calculation to use as an input.Build Date calculated fieldEnables you to create a new date or time field by using components from other fields or from specified values.As opposed to the build date calculation, the calculated field:
- Includes the option to extract date or time values from a date in Workday.
- Includes time (hour, minute, second, and millisecond) and time zone.
- Returns blank on error.
- Calculate a Future or Past Date
- FunctionDescriptionConsiderationsDate Increment/Decrement calculationStarts with a date and adds or subtract years, months, or days to return another date.To create the initial start date, you must define an instance value calculation or use 1 provided by Workday.Increment or Decrement Date calculated fieldComputes a date that's a number of days, months, or years before or after the value of a date field.Adds or subtracts a number of hours, minutes, seconds, and milliseconds to or from a date.The increment or decrement date calculated field can add or subtract hours, minutes, seconds, and milliseconds to or from a date.
- Return a Constant Value or Date
- FunctionDescriptionConsiderationsConstant Date calculationReturns a defined constant date.Date Constant calculated fieldEnables you to create a date, time, or time zone constant so that you can use it in other calculations.The date constant calculated field:
- Includes time (hour, minute, second, and millisecond).
- Enables you to define a time zone.
Constant Value calculationReturns a defined constant value.Numeric Constant calculated fieldEnables you to assign a numeric constant to a field so that you can use it in other calculations.The numeric value can be an integer or a real number. - Return a Value Based on Conditions
- FunctionDescriptionConsiderationsConditional calculationEvaluates a series of conditions and returns a date or value associated with the first condition that is true. If no conditions are true, the calculation returns a default value.You must use 1 of these calculations as the condition:
- Instance comparison.
- Logic.
- Value comparison.
Evaluate Expression calculated fieldGroups and transforms data by evaluating a series of boolean conditions and returning the value associated with the first condition that's true. If no conditions are true, the calculated field returns the default value.You must have existing fields for the evaluated conditions and values.Evaluate Expression Band calculated fieldSpecifies values for boolean conditions and returns grouped instances.You must have existing fields for the evaluated conditions. - Lookup
- FunctionDescriptionConsiderationsLookup calculationLooks up 1 value based on another value.Unlike the evaluate expression and evaluate expression band calculated fields:
- You must create a separate lookup table for lookup calculations.
- You can assign effective dates to search and return values.
Advanced lookup tables can have search criteria of:- Instance report fields.
- Numeric calculations.
- Text report fields.
Lookup Related Value calculated fieldReturns the value of a field on a related business object.You can promote fields from a related business object to the primary business object so you can perform these actions on the fields:- Filter
- Group
- Report
- Sort
- Summarize
- Extract Instance Values
- FunctionDescriptionConsiderationsInstance Value calculationReturns a boolean, currency, date, or numeric value by retrieving values for an instance.Only returns 1 value.Extract Single Instance calculated fieldExtracts a single instance from a multi-instance field based on boolean conditions.Extract Multi-Instance calculated fieldReturns multiple instances of a related business object based on a condition.Extracts multiple instances from a related business object based on boolean conditions.
- Calculate the Difference Between Dates
- FunctionDescriptionConsiderationsDate Difference calculationReturns the interval between 2 dates in days, months, or years.Date Difference calculated fieldReturns the intervale between 2 dates or times in years, months, days, hours, minutes, or seconds.Unlike the date difference calculation, the date difference calculated field:
- Includes time (hour, minute, and second).
- Returns zero on error.
- Can ignore lower-level date components. Example: You can determine if Workday considers days and time when finding the date difference for a month.
- Extract a Portion of a Date as a Number
- FunctionDescriptionConsiderationsDate Extract calculationReturns the year, month, or day from a date as a number.Limited to day, month, or year.You must enter the date to parse as an instance value calculation.Format Date calculated fieldReturns part of a date field as a text field.
- Enables you to define a custom format.
- Includes additional predefined formats, such as fiscal periods.
- Includes time (hour, minute, and second).
- Compare Values
- FunctionDescriptionConsiderationsInstance Set Comparison calculationCompare a report field or a custom field and a value or set of values using a relational operator.Value Comparison calculationCompare 2 operands using a relational operator.You can use a value comparison calculation to compare results from different instance value calculations or against a constant value calculation.This calculation only compares numeric data.True/False Condition calculated fieldReturns True or False based on boolean conditions.Enables you to build directly in the calculated field comparisons between:
- Values.
- Existing fields.
This calculation compares numeric and non-numeric data. - True/False
- FunctionDescriptionConsiderationsLogic calculationReturns True or False based on boolean conditions.Returns True for AND statements, if all conditions are true.Returns True for OR statements, if 1 or more conditions are true.You must have predefined comparisons such as:
- Value comparison calculations.
- Instance value calculations.
- Instance set comparison calculations.
True/False Condition calculated fieldReturns True or False based on boolean conditions.Enables you to build directly in the calculated field comparisons between:- Values.
- Existing fields.
This calculation compares numeric and non-numeric data.