Filter top x per id
Hi All,
I will just draw this as it will be easier to understand. I have alist of account with revenue atatched per country bu I only want to show the top x countries in revenue (top 2 in the example below). My tab is already sorted by Account and Revenue:
Here is what it looks like now:
Account | Country | Revenue |
Account1 | US | $100,00 |
Account1 | AU | $50,00 |
Account1 | UK | $20,00 |
Account1 | CA | $10,00 |
Account2 | US | $100,00 |
Account2 | JP | $50,00 |
Account2 | KR | $20,00 |
Account2 | CA | $10,00 |
Account3 | SG | $100,00 |
Account3 | US | $50,00 |
Account3 | CA | $20,00 |
Account3 | TH | $10,00 |
I would like to have top 2 country only:
Account | Country | Revenue |
Account1 | US | $100,00 |
Account1 | AU | $50,00 |
Account2 | US | $100,00 |
Account2 | JP | $50,00 |
Account3 | SG | $100,00 |
Account3 | US | $50,00 |
Finally I think the answer is no unless I use ETL but will ask any way, would there be any way to get:
I want to see the top x countries listed in one cell and get the SUM of revenue in the other one (SUM of revenue could be all countries or just those top x, either way this would work.)
Account | Country | Revenue |
Account1 | US, AU | SUM all revenue |
Account2 | US, JP | SUM all revenue |
Account3 | SG, US | SUM All revenue |
Thanks for your help!
Comments
-
You could do BeastMode calculations right on the card you are building. One idea coming to mind would be doing some sort of CASE statement to make a new value:
CASE WHEN Country IN (whatever specifications you'd like) THEN 1
WHEN Country IN (second specifiations) THEN 2
etc...
This way would allow you to group certain countries and then you can sum the revenue column once their grouped.
0 -
Thanks Cartergan.
The issue with your solution is that I do not want to select a set list of countries but I want to select the top ones based on revenue.
I do not know how/if I can get a top vlaues retunred with beastmode..
Anyone else?
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive