Beast Mode for Top 20 then Other
I am creating a table to rank sales by each company for the last 3 years and totalling the revenue.
I would like to show in a table the Top 20 companies by Total 3yr Revenue with the remaining companies aggregated in a row named "Other" rather than the individual company names.
I was trying a beast mode to rank each company by their individual total revenue divided by the total revenue for the entire dataset for a percentage, but I can't seem to get it to work.
Please help! I know how to do this with properties in a pie chart, but not in a table.
Thank you in advance!
Example table:
Company | 2015 Rev | 2016 Rev | 2017 Rev | Total Rev |
Co A | $1,000.00 | $1,000.00 | $1,000.00 | $3,000.00 |
Co B | $900.00 | $900.00 | $900.00 | $2,700.00 |
Co C | $800.00 | $800.00 | $800.00 | $2,400.00 |
Co D | $700.00 | $700.00 | $700.00 | $2,100.00 |
Co E | $600.00 | $600.00 | $600.00 | $1,800.00 |
Other | $5,000.00 | $5,000.00 | $5,000.00 | $15,000.00 |
TOTAL | $9,000.00 | $9,000.00 | $9,000.00 | $27,000.00 |
Best Answer
-
As stated here there is afaik no way to create or check a rank that is not already in the data by using Beast Mode - MySQL (which Beast Mode is based on) does not have these sort of partition functions, which is one of the most limiting factors. A new stable version should be released soon-ish and then eventually Domo will update. Whenever that will be exactly is anyone's guess.
There are workarounds - add a rank to your dataset via a dataflow like this in ETL or like this in a MySQL dataflow based on your 2017 revenue and then just beastmode something like
case when `rank` <= 20 then `rank` else 'Other' end
and format the table to your liking, using the SUM aggregation for the fields.
HTH
5
Answers
-
As stated here there is afaik no way to create or check a rank that is not already in the data by using Beast Mode - MySQL (which Beast Mode is based on) does not have these sort of partition functions, which is one of the most limiting factors. A new stable version should be released soon-ish and then eventually Domo will update. Whenever that will be exactly is anyone's guess.
There are workarounds - add a rank to your dataset via a dataflow like this in ETL or like this in a MySQL dataflow based on your 2017 revenue and then just beastmode something like
case when `rank` <= 20 then `rank` else 'Other' end
and format the table to your liking, using the SUM aggregation for the fields.
HTH
5 -
Trying to do the same thing. Is there an updated solution to this that doesn't require the ETL to be updated?
0 -
No. You can implement in a DSV (dataset view) but there is no native way in analyzer.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive