SAP Knowledge Base Article - Public

3045781 - Stacked Bar/Column does not sum up positive and negative value together for a total in SAP Analytics Cloud

Symptom

Stacked Bar/Column does not sum up positive and negative value together for a total in SAP Analytics Cloud (SAC)

Environment

  • SAP Analytics Cloud

Reproducing the Issue

  1. Create a story with Stacked Bar/Column chart.
  2. There is in the color dimension several members (stacked members), some of them are negative.
    => Note that the graph will show positive value and negative value and it will sum positive value only and negative value only but not positive + negative value.

Cause

The current behavior is by design and the reasons are:

  1. Stack Bar chart will have two parts, positive (above the horizontal line) and negative (below the horizontal line).
  2. The number at the very top is used to calculate the total of positive value, and the number at the bottom of the bar is to calculate the total of negative value. 
  3. It is not a good idea to combine this because it will cause confusion, and the current design actually follows the international business communication standard (IBCS)

Resolution

A possible workaround in classic design mode:

A stacked bar chart is meant to show the sum for the positive and negative stacked numbers, but not with a total sum across positive and negative. If you want to show a total sum for these values then you can create a calculated measure and show it as a separate chart, or you can change out your existing measures in the stacked bar to exclude any negative values.

e.g. 

Take two measures Original Sales Price (positive), and Discount (negative), and add them in a stacked chart to show Total Sales Price.   Then flip it, creating a calculated measure that subtracts Discount from Original Sales Price, and then creating a separate calculated measure taking the absolute value of the Discount.  Lastly, create a new chart, which would show the Total Sales Price, with two bars stacked (Original Sales Price and Discount).”

In Optimized Design mode you can use the  "Net Totals" option in the Stacked Bar/Combined Stacked Bar Styling Settings.  See help documentation here.

See Also

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

Keywords

SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, EPM-ODS, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics, translate, translation,
language, japanese, english, jp, en, sac, incorrect data, unexpected, wrong , KBA , LOD-ANA-DES , Story Design & Visualizations , Problem

Product

SAP Analytics Cloud 1.0