Example: Configure Balance Calendar Start and End Dates for a Leave Type
This example shows how to configure a balance calendar for a leave type so that the balance period aligns with each worker’s hire‑date anniversary in the leave‑event year. It uses the
Leave Balance Calendar Start Date
report field, which derives its value from the effective date of the leave event.When a worker requests a leave of absence, the leave business process has an effective date. Workday uses this effective date to populate the
Leave Balance Calendar Start Date
report field. You can then create calculated fields that define the start and end of each balance period and reference this report field so that Workday calculates the worker’s leave balance for the correct timeframe.For leave plans that use an anniversary year, the balance period resets on the worker’s anniversary date. Workday attributes each leave request to a specific service year based on the balance calendar start and end dates.
You want to configure the balance calendar start date and end dates for an anniversary-based calendar on a leave type. The goal is to determine the:
- TheBalance Calendar Start Dateas the anniversary of the worker’s hire date that occurs on or after the leave balance calendar start date.
- TheBalance Calendar End Dateas 1 day before the start of the next anniversary period.
Assume an employee has a hire-date anniversary of June 15. Consider these scenarios:
- Scenario 1:Leave before anniversaryFirst Day of Leave:May 1, 2024Evaluation:Is May 1, 2024 > June 15, 2024? No (False).Result:The employee is still in the anniversary year that started on June 15, 2023.
- Balance Calendar Start Date:June 15, 2023
- Balance Calendar End Date:June 14, 2024
- Scenario 2:Leave after anniversaryFirst Day of Leave:July 1, 2024Evaluation:Is July 1, 2024 > June 15, 2024? Yes (True).Result:The leave falls in the new anniversary year that starts on June 15, 2024.
- Internally, the calculation first returns July 1, 2023 (July 1, 2024 − 1 year) as an intermediate date value.
- The top‑level build‑date field then uses this intermediate date and the hire date to resolve the correct anniversary period that starts on June 15, 2024.
You create a set of calculated fields that together return the
Balance Calendar Start Date
and Balance Calendar End Date
:
- Leave Balance Calendar – First Day of Leave – 1 Year:Intermediate date field that subtracts 1 year from theLeave Balance Calendar Start Datevalue.
- Leave Balance Calendar – Hire Date (Month and Day) of Leave Event YearBuilds a date using the worker’s hire‑date month and day in the leave‑event year.
- Is First Day of Leave Greater Than Anniversary Date of Same YearTrue/false condition comparing the first day of leave and the hire‑date anniversary in the same year.
- First Day of Leave or First Day of Leave − 1 year if First Day of Leave is Greater than Anniversary DateEvaluate expression that chooses either the first day of leave or the helper date from step 1.
- Leave Balance Calendar – Hire Date (Month and Day) of Leave Event Year minus 1 Year if Hire Date for Current Year > First Day of Leave, Else …Top‑level build‑date field that returns theBalance Calendar Start Date.
- Leave Balance Calendar – Hire Date (Month and Day) of Leave Event plus 12 monthsIncrement/decrement date field that returns theBalance Calendar End Dateby adding 12 months to the start date.
Security:
Custom Field Management
domain in the System functional area.- Access theCreate Calculated Fieldtask.Create a calculated field as an intermediate step that you can use to support other calculations. This field subtracts 1 year from theLeave Balance Calendar Start Datevalue when needed.
- Enter or select these values and clickOK:FieldValueNameLeave Balance Calendar - First Day of Leave - 1 YearBusiness ObjectLeave Request EventFunctionIncrement or Decrement Date
- On theCalculationtab, enter or select these values and clickOK.FieldValueDate FieldLeave Balance Calendar Start DateYears to Add or Subtract-1
- ClickCreate Another Calculation.Build the hire‑date month and day in the leave‑event year.
- Enter or select these values and clickOK:FieldValueNameLeave Balance Calendar - Hire Date Month and Day) Of Leave Event YearBusiness ObjectLeave Request EventFunctionBuild Date
- On theCalculationtab, enter or select these Workday-delivered report field values and clickOK.FieldOptionValueYearExtract Year from Date FieldFirst Day of LeaveMonthExtract Month from Date FieldHire DateDayExtract Day from Date FieldHire Date
- ClickCreate Another Calculation.Determine whether the leave occurs after the hire‑date anniversary in the same year.
- Enter or select these values and clickOK:FieldValueNameIs First Day of Leave Greater Than Anniversary Date of Same YearBusiness ObjectLeave Request EventFunctionTrue/False Condition
- On theCalculationtab, enter or select these values and clickOK.FieldValueFieldLeave Balance Calendar - Hire Date (Month and Day) Of Leave Event YearOperatorgreater thanComparison TypeValue from another fieldComparison ValueFirst Day of Leave
- ClickCreate Another Calculation.Use either the first day of leave or the intermediate date field from step 1, based on the condition in step 3.
- Enter or select these values and clickOK:FieldValueNameFirst Day of Leave or First Day of Leave -1 year if First Day of Leave is Greater than Anniversary DateBusiness ObjectLeave Request EventFunctionEvaluate Expression
- On theCalculationtab, enter or select these values and clickOK.
- FieldValueField TypeDateDefault ValueLeave Balance Calendar Start DateConditionIs First Day of Leave Greater Than Anniversary Date of Same YearReturn Value if Condition is TrueLeave Balance Calendar - First Day of Leave - 1 Year
- ClickCreate Another Calculation.Build the finalBalance Calendar Start Datebased on the intermediate date field and hire date.
- Enter or select these values and clickOK:FieldValueNameLeave Balance Calendar - Hire Date (Month and Day) of Leave Event Year minus 1 Year if Hire Date for Current Year > First Day of Leave, Else Leave BalanceBusiness ObjectLeave Request EventFunctionBuild Date
- On theCalculationtab, enter or select these values and clickOK.FieldOptionValueYearExtract Year from Date FieldFirst Day of Leave or First Day of Leave -1 year if First Day of Leave is Greater than Anniversary DateMonthExtract Month from Date FieldHire DateDayExtract Day from Date FieldHire Date
- ClickCreate Another Calculation.Derive theBalance Calendar End Dateby adding 12 months to theBalance Calendar Start Date.
- Enter or select these values and clickOK:FieldValueNameLeave Balance Calendar - Hire Date (Month and Day) of Leave Event plus 12 monthsBusiness ObjectLeave Request EventFunctionIncrement or Decrement Date
- On theCalculationtab, enter or select these values and clickOK.FieldValueDate FieldLeave Balance Calendar - Hire Date (Month and Day) of Leave Event Year minus 1 Year if Hire Date for Current Year > First Day of Leave, Else Leave Balance Calendar - Hire Date (Month and Day of Leave Event Year)Years to Add or Subtract1Days to Add or Subtract-1
- ClickDone.
- Verify the balance calendar start and end dates.Use reports and configuration review to validate that Workday is calculating the correct date range for the leave type:
- As a test user, access theManage Absencereport and submit a leave request using the leave type that uses your new balance calendar fields.
- After the leave is approved, access theLeave Results for Organizationreport and select the worker’s organization.
- Enter a date that falls within the leave request period.
- In theCalendar Periodcolumn, confirm that theLeave Balance Calendar Start DateandLeave Balance Calendar End Datematch your expected logic for that leave event.
- Access theEdit Leave Typetask for the same leave type and select theValidations/Supporting Datatab.
- In theSupporting Datagrid, add two rows and select the calculated fields from step 5 and 6.
- Initiate a new leave request. On the business process page, verify that the displayed dates for the balance calendar start and end match your expectations
Expected results for the example scenarios
Scenario 1:
Leave before anniversary
- Hire‑date anniversary: June 15
- First Day of Leave: May 1, 2024
- ExpectedCalendar Period/Balance Calendardates:
- Start Date: June 15, 2023
- End Date: June 14, 2024
Scenario 2:
Leave after anniversary
- Hire‑date anniversary: June 15
- First Day of Leave: July 1, 2024
- ExpectedCalendar Period / Balance Calendardates:
- Start Date: June 15, 2024
- End Date: June 14, 2025