Creating buckets for unique ids to fall into, based on the sum of donations of those unique ids
Capturing donor frequency:
We want to count the number of donations a donor has given per procedure. The amount of donations is the bucket I want donors to fall into. So, if we had 100 donors give 4 donations, we want those donors to fall into the bucket '4', and then we would count the unique donor ids.
The part I am struggling to noodle out is that they want to be able to filter by procedures and any combination of procedures. There are many procedures, so if I were to try a rank and window approach, I would have to think of every possible combination of procedures and create a rank and window for each one (right?)
I thought maybe I could try a "sum of donations over partition by donor id" beastmode, but it doesn't group by the sum of donations, I just get separate rows (example 10 rows of 2 donations), so that did not work for me.
Side note: the buckets would be 1-24, and then one that is 25+
I've attached an image of sample data (top section) along with a picture of the idea I am going for.
I appreciate any advise, thanks
Answers
-
You won't be able to do this within a beast mode as you're needing to aggregate (count number of records in the bucket) on top of an aggregate (counting the number of donations).
I'd recommend using a Magic ETL to pre-aggregate your data to group by the donor id and procedure and count the number of donations. Then using that dataset you could use a beast mode to COUNT(DISTINCT `donor id`) but still allow the users to filter based on the different procedures.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
Thanks, I was definitely over-thinking this. I for some reason thought that way wouldn't work when I started this, but it did. Chalk it up to an airhead moment.
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