SAP Knowledge Base Article - Public

3575763 - Stacked Bars sorted in the opposite order than the Legend when the Stacked Bar Chart is based on an SAP BW Live Connection in SAP Analytics Cloud (SAC)

Symptom

  • Stacked Bars sorted in the incorrect order.
  • In Optimized Design Experience, a Stacked Bar Chart shows the Stacked Bars and the Legend in opposite sort oder.
  • In Classic Story mode, the same Stacked Bar Chart shows the Stacked Bars in the expected sort order.
  • Stacked Bars sorted in the opposite order than the Legend when the Stacked Bar Chart is based on an SAP BW Live Connection in SAP Analytics Cloud.

Environment

  • SAP Analytics Clouds 2025.1.6

Reproducing the Issue

  1. Login to SAP Analytics Cloud.
  2. Create an SAP BW Live Connection to an SAP BW System.
  3. Create a Model based on an SAP BW Live connection, and select an SAP BW Query.
  4. Create an Optimized Design Experience Story.
  5. Add a Chart widget based on a Model based on an SAP BW Live connection.
  6. Select a Stacked Bar/Column 
  7. Set the Chart Orientation to: Vertical
  8. Add a Measure, a Dimension, and a Color to the chart.
  9. Under "Styling", set the Legend Placement to: Beside Chart (Right)
  10. Select the Stacked Bar Chart, and click in the upper right corner the 3 dots, and select  "Sort -  <Dimension Name> - Ascending"
  11. The Stacked Bar Chart Legend is sorted based on the Dimension selected in Ascending order,
    but it displays the stacked bars in descending order from the top, to the bottom.

    The expectation it’s to see the stacked bars to display in Ascending order, from top, to bottom,
    Like it is displaying for Stacked Bar Chart based on Imported Model.

Cause

  • This situation occurs when at least one Dimension on the Chart has the option "Show Total" checked.

Resolution

  • Uncheck the option "Show Total" for all the Dimensions used on the Chart:
      
    1. In SAP Analytics Cloud, open the Story in Edit mode.
        
    2. Select the Stacked Bar Chart.
       
    3. In the Builder pane, on the right side, under Dimensions, click on the 3 dots of the Dimension,
      and uncheck the option "Show Totals"

    4. Under :"Color", click on the 3 dots of the Dimension,
      and uncheck the option "Show Totals"

    5. Save the Story.

Keywords

KBA , LOD-ANA-DES , Story Design & Visualizations , Problem

Product

SAP Analytics Cloud 1.0