SAP Knowledge Base Article - Public

3147132 - Week formula result is 1 week more - People Analytics Report Story


Report Story Week formula result is 1 week more compared to the calendars search online


SuccessFactors People Analytics
Embedded Usage of SAP Analytics Cloud
Report Story

Reproducing the Issue

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

1. Create a Story type report
2. From the Story query or datasource add a Week calculated column [Example: Week (TimeManagement#Employee_Time#StartDate)]
3. The result for the date December 3, 2021 is Week 49, while the calendar search online is Week 48


Expected behavior


Both the WEEK and ISOWEEK functions return the week number for a specified date but the format of the result is quite different, and the two functions may handle the first week of the new year differently. For example, when supplied the date 2017-01-01, the WEEK function considers the date to be part of the first week of 2017 and returns 1, whereas ISOWEEK considers the date to be part of the last week of 2016 and returns 2016-W52.

Report Story follows the calculation of WEEK function while some calendars search online or embedded to user's desktop are following the logic of ISOWEEK

See Also

SAP HANA SQL Reference Guide for SAP HANA Platform - WEEK Function (Datetime)


Week, Formula, Function, Report Story, Calculated column, People Analytics, Embedded , KBA , LOD-SF-ANA-SAC-QDS , Query Designer - Filter, Calculated Column, Params , Problem


SAP SuccessFactors HXM Core 2111