Symptom
- Legend sorted differently in different Stacked Bar Chart.
- Multiple Stacked Bar Chart based on the same Model sort the Chart Legend differently in SAP Analytics Cloud.
- Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP Analytics Cloud
Reproducing the Issue
- In SAP Analytics Cloud, create a Story.
- Add a Stacked Bar Chart based on one Model.
- Sort the Legend on the Measure from the Highest to the Lowest.
- Add a second Stacked Bar Chart based on the same Model, and add a Filter.
- Sort the Legend on the Measure from the Highest to the Lowest. ( The same sort as the first chart )
- Notice the Chart Legend list the items in different order.
Cause
- In brief, the Chart Legend is sorted in different order on the different charts because the data set is different.
- In more details: When sorting a Stacked Bar Chart on a Measure in decending order, the items in the Chart Legend will be listed from items that have the summary with the lowest values, to the items with the summary of the highest values, based on the first stacked bar of the chart. When the data set is different, and the summaries values for each items is different, then the Chart Legend of the Stracked Bar Chart will be sorted in different order.
- For example: In the screenshot of 2 Stacked Bar Charts in the section "Reproducing the Issue", the Chart Legend list the items: Blue and White in different order because the chart on the left, the first bar of the stacked bar chart shows the following on the first Stacked Bar:
- Blue : 10
- White : 45
And the legend displays the items with the lowest summary values, to the higher summary value, which is:
- Blue
- White
And the chart on the right side, the first bar of the stacked bar chart, are:
- White : 18
- Blue : 35
The legend displays the items with the lowest summary values, to the higher summary value, which is:
- White
- Blue
And this is why the Legend on both Stacked Bar Chart shows in different order.
- In Summary: Depending on the sort order selected for the Measure on the Stacked Bar Charts, the items in the Chart Legend will be listed as followed:
Measure Sorted on the Chart Legend will sort the items based on the first stacked bar of the chart from Highest to Lowest (Descending) Items with the lowest value to the items with the highest values Lowest to Highest (Ascending) Items with the highest value to the items with the lowest values
Resolution
- There are no option in SAP Analytics Cloud to sort the Chart Legend independently of how the Chart is sorted.
See Also
- 2569847 - Where can you find SAC user assistance (help) to use, configure, and operate it more effectively?
- Have a question? Ask it here and let our amazing SAP community help! Or reply and share your knowledge!
- 2487011 - What information do I need to provide when opening an case for SAP Analytics Cloud?
- 2511489 - Troubleshooting performance issues in SAP Analytics Cloud
Keywords
SAC , KBA , LOD-ANA-DES , Story Design & Visualizations , Problem
Product
SAP Analytics Cloud 1.0