Unique Count based on Revenue Amount
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!
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 datasetJae 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!
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 473 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 478 Datasets
- 211 Visualize
- 257 Beast Mode
- 2.1K Charting
- 12 Variables
- 85 Cards, Dashboards, Stories
- 18 Automate
- 355 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 183 Product Ideas
- 1.2K Ideas Exchange
- 11 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive