Beast Mode Sums not working, leading to strange sorting.
Hi there! I have 3 series made with Beast Mode:
Series 1 = sum(`a`) + sum(`b`) + sum(`c`)
Series 2 = sum(`d`) + sum(`e`) + sum(`f`)
Series 3 = sum(`a`) + sum(`b`) + sum(`c`) + sum(`d`) + sum(`e`) + sum(`f`)
I have Series 1 and Series 2 (blue and green) stacked on top of each other, and I'd like to sort by their combined totals. I try to do this by sorting by Series 3 (desc). However, if Series 1 or Series 2 is = 0 (e.g. there is no sum), then the calculated total is also 0. This leads to some strange sorting: For X-values where either Series 1 or Series 2 is 0 (no data for Series 1 or Series 2), the sorting is seemingly random. Do I need to check for 0s in my Beast Mode sum?
Thanks in advance!
Best Answer
-
I presume a - f are individual field values? I presume you've created a distinct Beast Mode for Series 3 to sum all of the a - f values? Are you creating a distinct beast mode calcs for your Series 1 & 2 results, or doing that as a CASE since the results a - c and d - f are mutually exclusive?
Then in SORTING, are you adding Series 3 / SUM-DESC as your primary sort?
If you are creating a single Beast Mode to handle Series 1 & 2, I would recomment doing them separately, and then bringing in both Series into your Values section. They'll still stack with the correct card type selection. Splitting them was the only way i was able to overcome this problem.
**Say thank you by clicking the 'thumbs up'
**Be sure to select the answer that represents the best solution and mark as "Accept as Solution"1
Answers
-
I presume a - f are individual field values? I presume you've created a distinct Beast Mode for Series 3 to sum all of the a - f values? Are you creating a distinct beast mode calcs for your Series 1 & 2 results, or doing that as a CASE since the results a - c and d - f are mutually exclusive?
Then in SORTING, are you adding Series 3 / SUM-DESC as your primary sort?
If you are creating a single Beast Mode to handle Series 1 & 2, I would recomment doing them separately, and then bringing in both Series into your Values section. They'll still stack with the correct card type selection. Splitting them was the only way i was able to overcome this problem.
**Say thank you by clicking the 'thumbs up'
**Be sure to select the answer that represents the best solution and mark as "Accept as Solution"1 -
Here's a link to an older thread on this topic.
https://dojo.domo.com/t5/Card-Building/Stacked-Bar-Chart-Sorting-Incorrectly/m-p/12433#U12433
**Say thank you by clicking the 'thumbs up'
**Be sure to select the answer that represents the best solution and mark as "Accept as Solution"1 -
I figured out that the problem comes when summing null values. Added a couple IFNULL() statements to my Beast Modes for the fix. Thanks for your help! ?
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive