SAP Knowledge Base Article - Public

2608576 - Wrong aggregation for calculated measures using HANA Live Data connection in SAP Analytics Cloud


  • HANA Calculated Measures with "If" formula and daysbetween() function do not display the correct values when using HANA Live Data Connection in SAP Analytics Cloud.
  • When using the "Data Preview" tab in HANA Studio, the measures return the correct values.


  • SAP Analytics Cloud 
  • Live Data Connection

Reproducing the Issue

  1. Create a Calculated Measure in HANA using an "If" formula and daysbetween() function.
  2. Create a story using HANA Live Data Connection.
  3. Add the same measures into a table or a chart.
  4. The value of the measure is different compared to the "Data Preview" tab in HANA Studio.


  • This is a by design behavior.
  • The reason that the HANA Studio data preview gives the expected result is because HANA Studio bypasses the Calculation Engine and uses SQL to get the result.


  • Cast the result of the If-formula with the decfloat(...) function.
  • Increase the precision/scale from 2 to 7 or greater.

See Also


SAC, SAP BusinessObjects Cloud, Business Objects, SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics, wrong, bad, mismatch, show, display, calculation, decimal, float, preview, , KBA , LOD-ANA , SAP Analytics Cloud (SAC) , LOD-ANA-BI , Business Intelligence Functionality, Analytic Models , LOD-ANA-PL , Planning , LOD-ANA-BR , SAC Boardroom , LOD-ANA-PR , SAC Predictive , Problem


SAP Analytics Cloud 1.0