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!**
  • 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"
  • 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