Skip to main content
Workday User Guide
Last Updated: 2026-04-17
Add a Prism Calculated Field to a Dataset

Add a Prism Calculated Field to a Dataset

  • Any of these security requirements:
    • Prism Datasets: Manage
      domain in the Prism Analytics functional area.
    • Dataset Editor
      permission on the dataset
    • Dataset Owner
      permission on the dataset.
You can transform data in a dataset by adding Prism calculated fields to the dataset. Prism calculated fields change the number of fields in a dataset, they don't change the number of records.
A Prism calculated field contains these components:
Component
Description
Name
The name you specify is the field display name.
Expression
The expression describes a processing step that you want to perform on the data in other fields in the dataset. Expressions can include:
  • References to other fields as input.
  • Constant values as literal text, numeric, or date values.
  • Functions from the Prism expression language.
  • Arithmetic, comparison, and logical operators.
For more information, see Concept: Prism Expression Language.
Field type
The expression determines the return value field type.
If the expression includes a function, then the return value of the function determines the field type.
If the expression doesn't include any function, then the operator determines the field type:
  • Arithmetic operators result in one of the numeric field types, depending on the input field types used in the expression. Example:
    Long * Integer
    results in a Long field, and
    Long * Numeric
    results in a Numeric field. Workday doesn't guarantee that each calculated field value will fit in the new field. Any calculated value that doesn't fit in the new field type becomes NULL. Workday automatically determines the digits before and after the decimal for Numeric field types. Numeric fields support a maximum precision of 38 digits, allowing you to specify up to 38 digits in total before and after the decimal point.
  • Comparison operators result in a Boolean field.
  • Logical operators result in a Boolean field.
You might need to create several Prism calculated fields to achieve the result you want. You can use the result of a Prism calculated field in the expressions of other Prism calculated fields to define a chain of processing steps.
You might want to use a Prism calculated field to:
Field Purpose
Example
Convert a field type to another field type.
Change an Integer field type to a Long field type, so that you can use the EPOCH_MS_TO_DATE function on it. Example:
EPOCH_MS_TO_DATE(TO_LONG([Date in MS]))
Perform an arithmetic calculation.
Calculate the net profit based on the revenue and expenses. Example:
[Revenue] - [Expenses]
Calculate the percent of total revenue for a particular sale. Example:
([Sale]/[Total Revenue])*100
Extract values from a different field.
Extract the currency codes from a currency field using the EXTRACT_CODE function. Example:
EXTRACT_CODE([Revenue])
Combine the values from 2 Text fields into 1 Text field.
Combine separate fields consisting of Last Name and First Name into 1 field using the CONCAT function. Example:
CONCAT([First Name], " ", [Last Name])
Test for a particular condition.
Test whether the year is between 2019 and 2020, inclusive. Example:
[year] BETWEEN 2019 AND 2020
Pad the beginning of a Text field with leading zeros.
The [EEID] is a Text field containing numeric data of varying lengths, and you want to create an [Employee ID] field that is always 7 characters long, including leading zeros where needed.
Create a calculated field called [PaddedID] that adds enough zeros to the beginning of [EEID] to create a full string, even if [EEID] is an empty string. Example:
CONCAT(“0000000", [EEID])
Then create a calculated field called [Employee ID] that returns the last 7 characters of the [PaddedID] field. Example:
SUBSTRING([PaddedID], (LENGTH([PaddedID])-7), 30)
Return a particular date given a Date field.
The [EFF_Date] field is a Date field, and you want to calculate and return the last day of the current month.
DATE_ADD(DATE_ADD(TRUNC([EFF_Date], "month"), 1, "month"), -1, "day")
To delete a Prism calculated field, access the
Edit Dataset Transformations
task, and select the menu for the Prism calculated field you want to remove and select
Delete Field
. Deleting a field might cause errors if other Prism calculated fields refer to the deleted field.
  1. Access the
    Edit Dataset Transformations
    task for a dataset.
  2. Select a dataset pipeline (required for derived datasets) and stage into which to add the Prism calculated field.
  3. Select
    Add Field
    .
  4. Enter an expression in the expression editor.
    If you use Currency fields that contain different codes, Workday treats the result of those calculations as NULL.
  5. In the inspector panel, enter a name. Field names must follow naming validation rules.
  6. Save the Prism calculated field by clicking
    Enter
    or
    Return
    on your keyboard.
    Clicking another field on the page also saves the changes to the Prism calculated field.
  7. (Optional) You can insert single and multiline comments into any location within a Prism expression. Workday treats all text between these characters as comments: /* */
    Workday won't consider the data values as comments if you enclose these characters and the comment within double quotation marks.