SAP Knowledge Base Article - Public

2635002 - Key Figure Formula Type TIME

Symptom

You created a new key figure with the formula type TIME (the system displays the value in time format) and the result is not showing the exact duration.

Environment

  • SAP Cloud for Customer
  • SAP Business by Design

Reproducing the Issue

  1. Go to the Business Analytics work center.
  2. Go to the Design Key Figures view.
  3. Click New.
  4. Enter the required details and select the required data source, e.g. Visit Header (technical ID CODAPAVISITHB) in C4C.
  5. In step 2 Restrict/Calculate Key Figure go to the tab Data and select TIME. Enter the key figure showing the duration you would like to convert.
  6. Finish the creation.
  7. Open the key figure in a report.
  8. You will see that the key figures only shows hh:mm:ss but does not take dates/ days into account.

Cause

The formula being used in this key figure TIME will only do the conversion for the number of seconds less than a day. The formula gives a difference in minutes and does not count the number of days. This is the current system behavior and works as designed.

Resolution

To achieve your result, please make use of one of the following workarounds:

  1. If you want to convert the exact duration, you need to create two key figures, instead of one. You can create the first key figure as above (KEY FIGURE 1) ,showing the duration in hours, minutes & seconds. You create a 2nd key figure which will divide the key figure showing duration in seconds by 86400 and then do a FLOOR to get the number of days. The formula would be: FLOOR([KEY FIGURE 1] / 86400). You can show these two key figures together.
  2. If you are prefer to see an approximate conversion in hours, you can have a single key figure which will divide the standard key figure showing duration in seconds by 3600 & do a FLOOR to get the approximate number of hours. The formula would be: FLOOR([standard key figure] / 3600).

See Also

Help Center Article: Formulas

Keywords

key figure; formula; date; TIME; actual duration; DOC_ACTUAL_DURATION; data source Visit Header; full duration , KBA , AP-RC-ANA , C4C, ByD, Travel: Analytics Tools & Frameworks , Problem

Product

SAP Business ByDesign all versions ; SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions