You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Replace CURRENT_DATE in formula to get previous year

edited Jul 30, 2020 7:26PM in Reporting and Analytics for HCM 3 comments

Summary

Head count by length of service report

Content

We currently have a report called Headcount by Length of Service. I am trying to pull the previous years (2019) data but because the formula for Length of Service has "CURRENT_DATE" the numbers are not pulling correctly. Is there a way to get this report to pull the data without looking at the current date and pull it as of the year?

I will attach the XML for reference to report.

 

CASE  WHEN YEAR(CURRENT_DATE) - YEAR("Worker"."Employee Hire Date") - (CASE WHEN (CAST(MONTH(CURRENT_DATE) AS INT)*100) + CAST(DAY(CURRENT_DATE) AS INT) <  (CAST(MONTH("Worker"."Employee Hire Date") AS INT)*100) + CAST(DAY("Worker"."Employee Hire Date") AS INT) THEN 1 ELSE 0 END) <2 THEN '0-1 Years' WHEN YEAR(CURRENT_DATE) - YEAR("Worker"."Employee Hire Date") - (CASE WHEN (CAST(MONTH(CURRENT_DATE) AS INT)*100) + CAST(DAY(CURRENT_DATE) AS INT) <  (CAST(MONTH("Worker"."Employee Hire Date") AS INT)*100) + CAST(DAY("Worker"."Employee Hire Date") AS INT) THEN 1 ELSE 0 END)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!