SAP Knowledge Base Article - Public

3256363 - How to calculate user age in Story report?

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:

  1. Edit an existing Story report or create a new one.
  2. Edit the Data Source used in the report.
  3. Create a new Calculated Column in the report query.
  4. 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

Creating Calculated Columns for Story Reports | SAP Help Portal

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

Product

SAP SuccessFactors Platform all versions