Unique Count based on Revenue Amount
Hi All,
I am working on a beast mode to count the number of contacts that have generated greater than $100k in revenue. I've tried the beast mode below, but it's only pulling null values. I kind of expected this to not work, but had to give it a try.
(CASE when `Revenue Amount (Global)` > 100000 then COUNT(DISTINCT `Contact ID`) end)
Part of the problem, I think, is that the beast mode isn't aggregating the revenue by contact. Our source data brings in every line of on every invoice so it can be thousands of rows even for one contact. However, I'd like to think that there's a beast mode out there that would help.
Let me know if there's any additional information that would be helpful. Any assistance would be greatly appreciated!
Thanks
Answers
-
If your revenue amount the amount for the total contract on each line item or are you needing to add all the line items together to get the total revenue?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
see my post at the bottom.
you can't write the CASE statement AFTER aggregation and expect a result.
COUNT(DISTINCT CASE when `Revenue Amount (Global)` > 100000 then `Contact ID` END)
this might work if your revenue is a column on the dataset
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"1 -
Grant, you might need to clarify your question, but I think I get the gist of what you're asking. I am trying to get a count of the # of contacts that have revenue greater than 100k. So it's a number of contacts I am looking for. Eventually, I want to do a % of total contacts, but need to take the first step.
@jaeW_at_Onyx I tried this and unfortunately it pulled zeroes. I believe the reason this won't work is because the contacts have many invoices tied to their name that are < 100k (most are less than $10k actually). I think that's what makes this a little challenging.
I did figure out one way to get the count I was looking for by manipulating filters instead of a beastmode so we're probably good here, but if you did have ideas feel free to leave them below in the comments!
Thanks
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 748 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 396 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 125 Manage
- 122 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 109 Community Announcements
- 4.8K Archive