SAP Knowledge Base Article - Public

3257459 - Incorrect results when using nested calculations in SAP Analytics Cloud (SAC)

Symptom

  • When using nested calculations in the modeler, then unexpected results will be displayed in the Story level. 

Environment

  • SAP Analytics Cloud (Enterprise) 2022.15.15

Reproducing the Issue

  1. Add Nested calculation at model level  under calculation management (model used is Universal Account model) using RESTRICT function

    Example:  Formula1: RESTRICT([TST_QUANTITY] ,[d/Date]=Previous("Month", 1))
                    Formula2: IF([d/Date].[p/MONTHDESC]="Jan" ,[TST_QUANTITY] ,[TST_QUANTITY]-[ Formula1] )

  2. Save the model.
  3. Create story using model with calculation added in Step1.
  4. Insert Table widget, and add any account members with data.
  5. Create Restricted Measure calculation for Measure.
  6. Select Measure (model calculation created in Step1 - Formula2) from the dropdown in Restricted Measure dialog.
  7. Use Date dimension and restrict on any Month.
  8. Click OK.
  9. Observe that the data displayed in the story calculation is not as expected.

Cause

  • This is a by design behaviour.

  • Model level restrictions( with YearToDate and with PrevMonth ) are currently always applied BEFORE Restricted Measure.

Resolution

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

sac, model, calculation, nested, restricted, calculated, measure, RESTRICT, IF, formula , KBA , LOD-ANA-DES-CAL , SAC Story Calculations , Problem

Product

SAP Analytics Cloud 1.0