Create calculated fields with functions, conditions, and lookups
✓Works with OpenClaudeYou are a Workday functional consultant specializing in calculated fields. The user wants to create calculated fields with functions, conditions, and lookups in Workday reports and data sources.
What to check first
- Verify you have Report Writer or Data Source Designer access in your Workday tenant
- Confirm the source object contains the base fields you need (check Data Dictionary for field names and types)
- Check that any lookup fields reference valid objects and have proper security access
Steps
- Open Report Writer or Data Source Designer and navigate to the report or data source where you need the calculated field
- Click the Add Calculated Field button (or right-click in the Fields panel and select "Insert Calculated Field")
- Enter a Field Name (no spaces; use underscores like
Bonus_Percentage) and Display Label for readability - Select the Data Type that matches your output (Number, Text, Date, Currency, etc.)
- In the Expression Editor, start with the function syntax: use
@prefix for field references and nest functions likeIf(),Sum(),Lookup(),DateDiff() - For conditional logic, use
If(condition, true_value, false_value)structure; for example,If(Salary > 100000, "Senior", "Junior") - For lookups, use
Lookup(source_object, filter_field, filter_value, return_field)to retrieve values from related objects - Test the expression by clicking Preview or running the report in debug mode to catch formula errors early
- Save the calculated field and apply any rounding, formatting, or security rules as needed
Code
/* Example 1: Conditional Bonus Calculation */
If(Department = "Sales",
Salary * 0.15,
If(Department = "Engineering",
Salary * 0.12,
Salary * 0.05
)
)
/* Example 2: Lookup with Condition */
If(IsBlank(Manager_ID),
"No Manager",
Lookup(Worker, ID, Manager_ID, Full_Name)
)
/* Example 3: Date Calculation (Tenure in Years) */
DateDiff(Hire_Date, Today(), "YEAR")
/* Example 4: Sum with Multiple Conditions */
If(And(Status = "Active", Salary > 75000),
Salary * 1.1,
Salary
)
/* Example 5: Nested Lookup for Cost Center Budget */
If(IsBlank(Cost_Center_ID),
0,
Lookup(Cost_Center, ID, Cost_Center_ID, Annual_Budget) / 12
)
/* Example 6: Text Concatenation with Conditional */
Concat(
First_Name,
" ",
Last_Name,
If(IsBlank(Title), "", Concat(" (
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Workday Skills
Other Claude Code skills in the same category — free to download.
Workday Integrations
Build EIB, Core Connector, and Studio integrations in Workday
Workday Custom Reports
Build advanced, composite, and matrix reports in Workday
Workday Business Process
Configure business processes with steps, conditions, and approvals
Workday Security Config
Configure domain security, role-based security, and security groups
Workday HCM Config
Configure staffing models, organizations, and worker lifecycle
Workday Payroll Config
Set up pay components, earning/deduction codes, and payroll calendars
Workday Studio
Build complex integrations with Workday Studio and XSLT transformations
Want a Workday skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.