Loading

Sorting Stacked Bars by the Percentage of One Segment

Дата публикации: Feb 19, 2026
Задача

How to sort the stacked bar graph by the percentage of one segment just like below.
User-added image

Действия
Create a calculation to get the percentage of the segment and sort the view by it. Please refer to the attached sample workbook as well as the video for more details.

1. Make a calculation like below to the percentage for 'Home Office'.
IF ATTR([Segment]) = "Home Office"
THEN SUM([Sales]) / TOTAL(SUM([Sales]))
ELSE 0
END

2. Add this field to [Columns] Shelf along with the original measure

3. Edit table calculation Compute Using > Cell to show the right percentage

4. Sort the view by the percentage calculation.
 
Дополнительные ресурсы
Sorting Segments Within Stacked Bars by Value
Номер статьи базы знаний

001456922

Вложения

Sort with Percentage_v2018.3.twbx

1243 KB

Sort with Percentage.mp4

3772 KB

 
Загрузка
Salesforce Help | Article