Loading

Sorting Stacked Bars by the Percentage of One Segment

Data pubblicazione: Feb 19, 2026
Operazione

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

Fasi
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.
 
Numero articolo Knowledge

001456922

Allegati

Sort with Percentage_v2018.3.twbx

1243 KB

Sort with Percentage.mp4

3772 KB

 
Caricamento
Salesforce Help | Article