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.5K Connect
- 1.2K Connectors
- 297 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive