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.2K Product Ideas
- 1.2K Ideas Exchange
- 1.3K Connect
- 1.1K Connectors
- 273 Workbench
- 2 Cloud Amplifier
- 3 Federated
- 2.7K Transform
- 78 SQL DataFlows
- 525 Datasets
- 2.1K Magic ETL
- 2.9K Visualize
- 2.2K Charting
- 434 Beast Mode
- 22 Variables
- 510 Automate
- 114 Apps
- 388 APIs & Domo Developer
- 8 Workflows
- 26 Predict
- 10 Jupyter Workspaces
- 16 R & Python Tiles
- 332 Distribute
- 77 Domo Everywhere
- 255 Scheduled Reports
- 66 Manage
- 66 Governance & Security
- 1 Product Release Questions
- Community Forums
- 40 Getting Started
- 26 Community Member Introductions
- 68 Community Announcements
- 4.8K Archive