Sorting 100% Stacked Bar by category
I have a 100% Stacked Bar Chart for net hours worked. Each bar is an employee and is broken into net hours by pay category (OT1.5 vs. OT2.0 vs. Reg).
I want to sort the chart so that the employee with the lowest percentage of OT1.5 is on top and the employee with the largest percentage is on bottom.
I started by fiddling with the "Sort on Totals" toggle under "General" in the Chart Properties pane. However, this sorts the bars by total net hours worked in all categories, not by percentage in one category.
So I made a beast mode (see attached photo). I checked to make sure that the beast mode calculates correctly - it does (see attached photo of single bar chart with "Sort Order" as the values field. It correctly returns the percentage of OT1.5 hours for each employee). But when I use the "Sort Order" beast mode to sort the 100% stacked bar, it does not work (see photo of 100% stacked bar with "Sort Order" in the sorting pane. The bars are not sorted correctly). It looks like the issue is that when I use the beast mode to sort, Domo calculates the beast mode for each row of the dataset instead of as an aggregate (see photo of data table. "Sort Order" returns 1 for OT1.5 rows and 0 otherwise).
Any pointers on how to adjust the beast mode so that the bars sort correctly is much appreciated!
*All data is fictional and used only to illustrate this idea
- 10.7K All Categories
- 13 Getting Started in the Community
- 41 Beastmode & Analytics
- 2.1K Data Platform & Data Science
- 59 Domo Everywhere
- 2.7K Charting
- 2.5K Ideas Exchange
- 1.3K Connectors
- 362 Workbench
- 303 Use Cases & Best Practices
- 503 APIs
- 120 Apps
- 48 News
- 753 Onboarding
- 1.2K 日本支部
- Private Company Board