Symptom
This KBA provides the steps and formula required to calculate user age in Story reports using a calculated column.
Environment
SAP SuccessFactors HCM Suite
Resolution
To calculate a user's age in a Story report:
- Edit an existing Story report or create a new one.
- Edit the Data Source used in the report.
- Create a new Calculated Column in the report query.
- Use the following formula to calculate age:
IF(MONTH(CURRENTDATE()) > MONTH([User#Basic Personal Information#Date of Birth]) OR (MONTH(CURRENTDATE()) = MONTH([User#Basic Personal Information#Date of Birth]) AND DAY(CURRENTDATE()) >= DAY([User#Basic Personal Information#Date of Birth])), YEAR(CURRENTDATE()) - YEAR([User#Basic Personal Information#Date of Birth]), YEAR(CURRENTDATE()) - YEAR([User#Basic Personal Information#Date of Birth]) - 1)
Note: The column ID for Date of Birth may vary by system. Ensure you select the correct field from your data source.
See Also
Keywords
age calculation, story report, calculated column, date of birth, DOB, user age, employee age, age formula, SAP SuccessFactors, Analytics Cloud, SAC, report query, query designer, create age field, birthday, age field not working, incorrect age, how to calculate age, SF report age, age column, age not showing, age not calculating, age formula error, age calculation issue, KBA age story report , KBA , LOD-SF-ANA-SAC , Stories in People Analytics , LOD-SF-ANA-SAC-QDS , Query Designer - Filter, Calculated Column, Params , How To
SAP Knowledge Base Article - Public