Chapter 10
Chapter 10
OVERVIEW
This chapter introduces the different types of calculated fields and explains methods to help you
identify and access the calculated fields in your tenant.
OBJECTIVES
By the end of this chapter, you should be able to:
pg. 1
CALCULATED FIELDS OVERVIEW
Calculated fields are field definitions that you configure to manipulate, transform, retrieve, and
derive values based on existing data. You can use calculated fields to:
You can use calculated fields in a variety of ways. Use calculated fields in reporting to deliver data
that is otherwise unavailable on the primary business object of the report. As an example, you may
need to generate a Social Security number excluding dashes. You can use a Concatenate Text
calculated field function to link together the numbers extracted using the Substring Text function.
You can also use calculated fields to create custom prompts or filters that affect the report output.
For example, you can create a True/False Condition (Boolean) calculated field to display workers with
a regular or full-time status and exclude contract workers.
Additionally, you can use calculated fields to access data on the primary business object (PBO). For
example, you can make data accessible from a related business object (RBO) on the PBO for use in
report types, report functions, and in other calculated fields.
pg. 2
CREATE A CALCULATED FIELD
The basics for creating a calculated field involve running the Create Calculated Field task and
configuring the Calculation and the Additional Info tabs accordingly. You can follow these steps:
• To create system-wide calculated fields, use the Create Calculated Field task.
• Run the Create Calculated Field task:
o Enter the name for the calculated field.
o Select a Workday-delivered business object.
o Choose a function type.
• In the Calculation tab, specify the calculated field's parameters. Parameters vary depending
on the calculated field function selection.
pg. 3
INITIAL INFORMATION
At the prompt, enter a field name, select the business object, and the function. The business object
choice determines two major outcomes:
• What fields are available within the calculation? If you choose the Employee business object,
all class report fields on the Employee business object are available for use in your calculated
field.
• Where can you use the new calculated field? If you choose the Employee business object,
your calculated field is available anywhere you use fields on Employee. The calculated field is
a new field on the Employee business object and has the same access rules and
characteristics as the other fields on Employee.
CALCULATION TAB
In the Calculation tab, you specify the parameters of the calculated field. The parameters you
configure here vary depending on the calculated field function you select.
pg. 4
ADDITIONAL INFORMATION TAB
Use the following fields, as necessary, in the Additional Information tab to provide specifics about
your calculated field. These fields help organize, document, locate, and reference your calculated
field.
pg. 5
Term Definition
Description Helps you and other users to track the purpose of each calculated
field.
Category Helps users locate calculated fields by category in field prompts.
"Uncategorized" is the default. You can configure more categories as
needed.
Authorized Usage Allows customers to restrict the areas within Workday where the
calculated field will display in prompts. Use "Default Areas" as it is the
default. For example, add Benefits Eligibility, Calculation Engine
(Payroll/Absence), and Compensation Eligibility in addition to "Default
Areas" if needed.
Intermediate Calculation Drives whether the calculated field shows in main field prompts or
not. If checked as Intermediate, it does not show in main prompts and
shows up in the "Other" category. If you do not select Intermediate, it
shows in main field prompts under the "All" or designated Category.
Intermediate calculated fields are searchable and usable. This
checkbox only dictates where the field shows in field prompts.
Do Not Use Appends the "Do Not Use" label to your calculated field name to
indicate not to use this field anymore. Use fields shown in the main
field prompt only (All or By Category) and do not use fields found
under Other > Do Not Use Fields
Note: You cannot delete Calculated fields when they are in use. Mark
as "Do Not Use" in development or if you plan to deprecate use.
Advanced Options
The system collapses the Advanced section in the Additional Info tab by default. You can expand this
section to access available options.
pg. 6
COPY A CALCULATED FIELD
To copy an existing calculated field, use its Related Actions to select Calculated Field > Copy. When
you copy an existing calculated field, the new field must use the same business object and function
as the original field.
NAMING CONVENTIONS
The best practice when creating calculated fields is to adhere to a set naming convention for your
organization. You can include information in the name of the calculated field to easily identify details
such as organization, calculated field function, report author name, and report name.
Alternatively, you can name your calculated fields like any other field in Workday. You can include the
details in the Category and Description sections of the Additional Info tab.
Make sure your organization has a set naming convention and method of organizing your calculated
fields and reports. Adhere to these conventions to avoid redundancy.
pg. 7
ACTIVITY
ACTIVITY #10.1
1. Use the calculated field's Related Actions to select Audits > View Audit Trail.
2. Select OK and view the changes in the calculated field's definition.
Since we do not use the Test CF calculated field anywhere, We can delete the definition.
1. From the calculated field's Related Actions, select Calculated Field > Delete.
2. Select OK and Done to delete the calculated field definition.
pg. 8
PERFORMANCE CONSIDERATIONS
For optimal report performance, follow basic guidelines for designing the report.
First, when using calculated fields, consider other available options first. Make sure there are no
Workday-delivered fields you can use in place of calculated fields. Try rewording searches to make
sure you are not missing a field that is already available.
Second, you can use subfilters and related objects to avoid building calculated fields unnecessarily.
Also, limit the number of calculated fields on your reports.
And, finally, make sure calculated fields are not too complex. Remember, if the system performs
multiple calculations on larger quantities of data, it can affect report output speed.
They can also vary over time such as today, last day of this month, and current user.
To create additional global fields, select Global as the business object when creating a calculated
field. Global fields display in their own Global field prompt category.
Example: A global calculated field that returns a date field value of one year before the variable value
of Today (review the image below).
pg. 9
INCREMENT OR DECREMENT DATE
The Increment or Decrement Date function calculates a date that is a specific number of:
Years/Months/Days/Hours/Minutes/Seconds/Milliseconds.
It does so before or after the value of a date field. This function returns a Date field type. In the
example below, we add one year to the Credit Verification Date field to derive a credit verification
renewal date.
• Calculate two months from now for use in a report filter to select the employee certifications
that expire in the next two months.
• Dynamically calculate the "First day of the month, three months ago" for use as a parameter
for scheduling a recurring report.
• Subtract one millisecond from the date/time that a business process event completed to
access the value of a field before the business process change.
• Use a pair of calculated fields that return all customers without current credit verifications
from the last year. Then, create a report that shows all the overdue customer credit
verifications.
DATE DIFFERENCE
The Date Difference function computes the number of years, months, days, hours, minutes, or
seconds between two dates. The calculation subtracts the start date from the end date. If the
calculation requires a date constant, it must exist before you create the calculated field. The system
rounds the results down to the nearest whole number depending on the value returned. This
function returns a numeric field type.
FORMAT DATE
The Format Date function extracts the year, year-quarter, and year-month from a date and formats it
as a text field. It can also extract and format fiscal period, fiscal year, fiscal year-period, and date-time
fields.
This function enables you to determine higher-level time periods from a date. For example, you
could use this function to group and summarize headcount activity by month or generate a list of
promotions by quarter. You can also use it to extract date components based on an employee's hire
date, determine who is going to have an anniversary next month, or extract the month and date
from an employee's birth date.
pg. 10
Format Mask provides additional date formatting beyond predefined formats. It allows you to
construct a formatting mask using the options shown below. These mask options are case-sensitive.
You can combine them with each other, along with spaces and other characters. For example, a
format mask such as h:m would produce a result such as "9:28 PM." In addition, you can add other
text, even if the text contains these reserved characters, provided that you wrap the text in single
quotes. For example: 'Hello, the time is:' h:m a. would produce a result like "Hello, the time is: 9:28
PM."
pg. 11
ACTIVITY
ACTIVITY #10.2:
1. Sign in.
2. Run the Create Custom Report task.
3. Enter the following information:
Report Name: WICT CF Expense Report Payment Dates
Report Type: Advanced
Optimized for Performance: (unchecked)
Data Source: Expense Reports for Company
4. Select OK.
5. In the Data Source Filter, select Expense Reports Filter (if not already set).
6. In the Columns tab, add the Expense Report, Expense Report Date, and Approval Date fields
to the report using the Expense Report business object.
7. Select OK.
8. Run the report using Global Modern Services, Inc. (USA) as the Company
1. Run the Create Calculated Field task and enter the following information:
Field Name: Entry Value WICT CF Expected Paid Date
Business Object: Expense Report
Function: Increment or Decrement Date
2. Select OK.
3. Enter the following information:
Date Field: Approval Date
Days to Add or Subtract: 30
(Note: To search for a Numeric Constant, you must enter at least two
characters in the field to search. An easy way to locate numeric constants,
particularly single digit constants, is to enter "#" before the number you are
searching for (e.g., "#1").
Return Blank Date on Error: (checked)
1. Navigate to the Edit Custom Report task and select the WICT CF Expense Report Payment
Dates report.
2. Select OK.
3. In the Columns grid, add a row after the Approval Date field and add the newly created
calculated field WICT CF Expected Paid Date to the report definition.
4. Add another row after below the last row in the Columns grid and add the Paid Date fields to
the report definition.
5. Select OK to save the updated report definition.
6. Run the WICT CF Expense Report Payment Dates report for Global Modern Services, Inc.
(USA). Notice the expected date for each expense report, as well as the actual payment date.
pg. 12
Task #4: Create a Date Difference Field
Next, you need to determine how many days it takes for each of the expense reports to pay out.
Since you already know the approval date and paid date, you can use a Date Difference calculated
field to return how many days pass between those two dates.
1. Run the Create Calculated Field task, and enter the following information:
Field Name: WICT CF Days Before Payment
Business Object: Expense Report
Function: Date Difference
2. Select OK and enter the following information:
Start Date Field: Approval Date
End Date Field: Paid Date
Value Returned: In Days
Return Zero on Error: (checked)
1. Navigate to the Edit Custom Report task and select the WICT CF Expense Report Payment
Dates.
2. Select OK.
3. From the Columns grid, add the WICT CF Days Before Payment field to the report definition
after the Paid Date field.
4. In the Column Heading Override column, enter the following information:
WICT CF Expected Paid Date: Expected Paid Date
Paid Date: Actual Paid Date
WICT CF Days Before Payment: # of Days Before Payment
5. Select OK and run the report for Global Modern Services, Inc. (USA).
pg. 13
SUBSTRING TEXT
The Substring Text function extracts the specified portion of text within a field. You can use it to
extract a substring from a text or single-instance field. You can base substrings on fixed positions or
delimiters allowing you to search a string forward or backward.
For example, you use a report for an integration to another system. You need to extract only the Cost
Center Name from a field that contains both Cost Center Number and Name.
You can also use a delimiter substring type to convert text that contains a special character, such as a
dash, forward slash, or even a blank space.
The Convert Text to Number function includes an option to return zero if the result is not valid,
instead of displaying a runtime error message.
pg. 14
ACTIVITY
ACTIVITY #10.3:
1. Sign in.
2. Search for and run the WDINST CF Employee Details Report.
3. Use the report's Related Actions to select Custom Report > Copy.
4. Name your new report WICT CF Employee Details Report and make sure the Optimized for
Performance checkbox is unchecked.
5. Select OK to save the new report.
6. In the Columns tab, add the Length of Service - Worker field to the Columns grid after the
Hire Date field.
7. Select OK to save the report.
8. Run the report.
For this part of the activity, you are going to configure two calculated fields. These two calculated
fields will give you practice configuring a Substring Text and a Convert Text to Number calculated
field. In Workday, you could use the existing delivered field - Length of Service in Years Including
Partial Year - Worker - to filter this report without building any calculated fields.
1. Select the Create Another Calculation button, or run the Create Calculated Field task, and
enter the following information:
Field Name: WICT CF Length of Service in Years
Business Object: Worker
Function: Convert Text to Number
2. Select OK and enter the following information
Text Field: WICT CF Extract Years from Length of Service
Decimal Separator: Based on a user's locale (Default Value)
Return Zero on Error: (checked)
3. Select OK to save.
pg. 15
Task 4: Add Calculated Fields to Custom report
1. Run the Edit Custom Report task and select the WICT CF Employee Details Report.
2. In the Columns tab, add a row after the Length of Service - Worker row, and add the WICT CF
Length of Service in Years field.
3. In the Filter tab, select the add icon to add a row to the Filter conditions for filtering on
instances grid.
4. Enter the following information:
Field: WICT CF Length of Service in Years
Operator: Greater than or equal to
Comparison Type: Value specified in this filter
Comparison Value: 5
5. Select OK to save the changes to the report.
6. Select Run to view the report output. Notice that now the report output only displays
employees with five or more years of service.
pg. 16
TEXT LENGTH
The Text Length calculated field returns the length of a text field or a single-instance field that you
can use as filter criteria in a custom report. Doing so lists any employees whose data the system
truncates during an integration.
For example, assume the third party you are integrating with only allows a 15-character city field. You
can create a calculated field to determine the length of each employee's city field. You can then use
that calculated field in a report filter. The system returns a numeric field. For example, you can use it
for a custom audit report that lists any employees whose City field data the system truncates during
the integration.
TRUE/FALSE CONDITION
The True/False Condition calculated field function determines if a condition is true or not. The return
is a Boolean type field that you can use in custom reporting, condition rules, and as a condition for
other calculated fields. You can use parentheses, when necessary, to group the conditions for
evaluation.
EVALUATE EXPRESSION
The Evaluate Expression calculated field function groups and transforms data. This function evaluates
a series of conditions and returns the value associated with the first condition that is true. At
runtime, the function applies the default value and then starts testing conditions starting with the
first condition defined. If a condition is true, Workday sets the corresponding return value and does
not test any subsequent conditions. Otherwise, Workday tests the second condition, and if true, sets
the corresponding return value, and so on.
The evaluated conditions must be a Boolean field that returns a true or false value at runtime. If you
use Evaluate Expression, you can capture information that evaluates existing data across different
fields and returns values in one calculated field. Also, with an Evaluate Expression function, don't
forget to place the most likely conditions first to optimize report performance.
pg. 17
ACTIVITY
ACTIVITY #10.4:
1. Sign in.
2. Search for and run the WICT CF Employee Details Report.
3. Use the Related Actions from the report to select Custom Report > Copy.
4. Name the new report WICT CF Employee Comp Levels and make sure the Optimized for
Performance checkbox remains unchecked.
5. Select OK.
6. Confirm that the Data Source Filter is All Employees.
7. In the Columns tab, remove the following fields: Length of Service - Worker, WICT CF Length
of Service in Years, WICT CF Extract Years from Length of Service, and Last Base Pay Increase -
Date.
8. In the Filter tab, remove the WICT CF Length of Service in Years filter.
9. Select OK to save the report
10. Run the report.
1. Select the Create Another Calculation button or run the Create Calculated Field task.
2. Enter the following information:
Field Name: WICT CF Low Comp Boolean
Business Object: Worker
Function: True/False Condition
3. Select OK.
4. Enter the following information:
pg. 18
Field: Total Base Pay Annualized in Reporting Currency - Amount
Operator: Less than or equal to
Comparison Type: Value specified in this filter (default value)
Comparison Value: 50000
5. Select OK to save this field.
6. Use the new field's Related Actions to copy it.
7. Enter the following information:
Field Name: WICT CF Medium Comp Boolean
Field: Total Base Pay Annualized in Reporting Currency - Amount (defaults in from
copied field)
Operator: Greater than
Comparison Type: Value specified in this filter (default value)
Comparison Value: 50000 (defaults in from copied field)
8. Add a new row in the Calculation tab.
9. Enter the following information:
Field: Total Base Pay Annualized in Reporting Currency - Amount
Operator: Less than
Comparison Type: Value specified in this filter
Comparison Value: 100000
10. Select OK to save this field.
11. Use the new field's Related Actions to copy it.
12. Name the new field WICT CF High Comp Boolean.
13. Delete the last condition row that copied over.
14. Edit the remaining row using the following information:
Field: Total Base Pay Annualized in Reporting Currency - Amount
Operator: Greater than or equal to
Comparison Type: Value specified in this filter
Comparison Value: 100000
15. Select OK to save this field.
Now, you need to create an Evaluate Expression calculated field to associate the True/False
Conditions with your new text constants.
1. Select the Create Another Calculation button or run the Create Calculated Field task.
2. Enter the following information:
Field Name: WICT CF Eval Comp Level
Business Object: Worker
Function: Evaluate Expression
3. Select OK.
4. Enter the following information:
Field Type: Text
Default Value: Global Fields > Text > -
5. Use the Add Row icon to add two additional rows in the calculation section, for a total of
three rows.
6. Enter the following information:
Condition Return Value If Condition is True
WICT CF Medium Comp Boolean WICT CF Medium
pg. 19
WICT CF High Comp Boolean WICT CF High
WICT CF Low Comp Boolean WICT CF Low
7. Configure the Additional Info tab as necessary.
8. Select OK to save.
pg. 20
LOOKUP RANGE BAND
The Lookup Range Band calculated field function accesses a specific value and determines where it
falls in relation to a set of defined ranges. This function is like the Evaluate Expression function,
except it only evaluates numeric or currency fields. This function returns a single-instance field type
that corresponds to the range band (the range of values) in which the source field falls. The
calculated field returns a blank instance if the value of the field does not meet a defined band.
You can use the Evaluate Expression Band calculated field to specify values for True/ False (Boolean)
conditions and return instances.
pg. 21
Evaluate Expression Band works like the Evaluate Expression calculated field in that it evaluates a
series of True/False conditions. However, Evaluate Expression Band always returns a single instance
type field whose values are defined when creating the field.
pg. 22
ACTIVITY
ACTIVITY #10.5:
pg. 23
Business Object: Worker
Field: WICT CF Extract Oldest Child
Column Heading Override: Worker's Oldest Child
3. Save and run the report. Now, the worker's oldest child dependent appears in one column.
You can also use the extract single instance field as a related business object and return
values based on that instance.
4. Edit the WICT CF Employee Dependents report.
5. Add two rows after the WICT CF Extract Oldest Child field, and enter the following
information:
pg. 24
EXTRACT MULTI-INSTANCE
Extract Multi-Instance extracts specific instances from a multi-instance field. The calculated field
returns zero, one, or multiple instances based on the number of instances that satisfy the condition.
• As a subset, it filters instances from the specified source field (Source Field 1) and returns the
results. For example, return workers in the organization who are "high potential."
• As an intersection, it evaluates the filtered instances from both fields (Source Field 1 and
Source Field 2) and returns only the instances that are common to both fields. For example,
return workers who are in the organization now and were in the organization one year ago.
• As an exception, it evaluates the filtered instances from both specified source fields (Source
Field 1 and Source Field 2) and returns the instances from the first field minus the instances
from the second field. Intersection is useful for exception reporting. For example, return a list
of benefits in which an employee is enrolled currently, but for which the employee is not
currently eligible.
• As a union, it combines the filtered instances from both specified source fields (Source Field
1 and Source Field 2) and returns the results. For example, return a list for each employee
consisting of their manager and HR Partner.
pg. 25
In functions using two source fields, both source fields must be on the same business object.
pg. 26
ACTIVITY
Task #1: Create Calculated Fields
pg. 27
LOOKUP RELATED VALUE
The Lookup Related Value function retrieves a value from a field on a related business object. This
function promotes that value from the related business object to the primary business object. Once
the value is available on the primary business object, you can use it for a calculation, condition rule,
or reporting.
pg. 28
ACTIVITY
1. Sign in.
2. Edit the WICT CF Employee Details Report and add the following fields after the Hire Date
field:
Business Object Field Column Heading Override
Worker Manager - Level 01 Worker's Manager
Manager - Level 01 Hire Date Manager's Hire Date
3. Click OK.
4. Run the report. View the report output and find examples where an employee's hire date
does not equal their manager's hire date.
1. Run the Create Calculated Field task, and enter the following information:
Field Name: WICT CF Managers Hire Date
Business Object: Worker
Function: Lookup Related Value
2. Click OK.
3. Enter the following information:
Lookup Field: Manager - Level 01
Return Value: Hire Date
4. Click OK. Now the manager's hire date is accessible on the Worker business object and you
can calculate a date difference between the worker's hire date and the manager's hire date.
1. Click the Create Another Calculation button or run the Create Calculated Field task.
Field Name: WICT CF Hire Date Difference from Manager
Business Object: Worker
Function: Date Difference
2. Click OK and enter the following information:
Start Date Field: Hire Date
End Date Field: WICT CF Managers Hire Date
Value Returned: In Months
Return Zero on Error: (select)
3. Click OK.
1. Run the Edit Custom Report task and select the WICT CF Employee Details Report report.
2. After the Employee field, add the WICT CF Managers Hire Date and WICT CF Hire Date
Difference from Manager fields to the report.
3. Click OK and run the report.
pg. 29
CHAPTER SUMMARY
• Calculated fields allow you to put data where you want it, how you want it.
• Calculated fields have an association with a specific business object.
• At runtime, the system determines calculated field value results.
• Reporting, business process condition rules, integrations, and recurring processes are ideal
uses for calculated fields.
• Access to a calculated field depends on the security of the underlying secured fields in the
calculation.
• Calculated fields can impact report performance.
pg. 30