SAP Knowledge Base Article - Public

3157362 - Show total does not work as expected with calculated measure in a Table widget.

Symptom

Show total option does not work as expected in a Table widget, when a calculated measure is used with an "if" condition.

Environment

SAP Analytics Cloud (Enterprise)

Reproducing the Issue

  1. Create a story and add table widget.
  2. Create Calculated Measure using IF formula.
  3. Use dimensions as parameter in the IF formula as seen in the example below

    Example :  Calculated Measure( “IF([d/"Day_of_Week_averages":QUARTER]='01' ,["Day_of_Week_averages":VOLUME_TON]/90 ,IF([d/"Day_of_Week_averages":QUARTER]='02' ,["Day_of_Week_averages":VOLUME_TON]/91,["Day_of_Week_averages":VOLUME_TON]/92 ) ) “

  4. Apply show total on table widget.
  5. Observe that totals does not show up.

Cause

The behavior is by design.

Resolution

  • MDS returns an undefined error in this use-case because of the dimension, where the totals is defined, would be internally thrown away in order to calculate the totals.
  • MDS processes the attribute lookup ( defined by formula), where the same dimension is referenced which is internally thrown away. This leads to undefined calculation of the formula because the of the dimension, where MDS should refer to, does not exist anymore as its already thrown away. Hence this behavior works by design.

See Also

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

Keywords

sac, sap analytics cloud, table, widget, calculated measure, cm, if, formula, show total, dimension , KBA , LOD-ANA-DES-CAL , SAC Story Calculations , Problem

Product

SAP Analytics Cloud all versions