Hey guys,
We're looking to take a dataset from our CRM and SUM a column with all of the values in the value column ONLY if the deal is won, and then divide it by the count of Won deals. How would we do this? Trying to see year over year how big our average deal is...
It would go something like this:
SUM(CASE WHEN `Status` like 'won' THEN `Value` END)/COUNT(CASE WHEN `Status` like 'won' THEN `Value` END)
Let me know if you need anything else,
ValiantSpur
Thank you for your help!