Tagged with data-typing - Visokio Forums http://forums.visokio.com/discussions/tagged/data-typing/feed.rss Mon, 30 Oct 17 16:10:00 -0400 Tagged with data-typing - Visokio Forums en-CA SUBSET Functions: Calculating sum within a date range http://forums.visokio.com/discussion/2923/subset-functions-calculating-sum-within-a-date-range Fri, 01 May 2015 11:26:48 -0400 DDrob 2923@/discussions
I haven't posted here before, I usually manage to work my issues out if I look at it for long enough but this one is just puzzling me. I feel like I'm doing everything right but I'm not getting the desired outcome.

My data is sales data, split by day and email address, where each row is a sale. I'm trying to create a new field which determines whether the sale was from a new customer (this was their first purchase in the last year), or an existing customer (purchased in the last year).

My steps were as follows:
1. Create a new field (StartDate) which is a DATEADD of -1 year to determine the lower end of my existing customer bracket.
2. Create a new field which is a function of SUBSET_SUM, SUBSET3 where Email=Email,Date>StartDate,Date
This will give me a sum of the sales where the email has appeared previously within my date range, and I can take 0 values as new and anything else as existing.

Now, my new field isn't returning anything and I can't work out why.

Hope you can help.

Thanks

P.S. I will attach the formula I used when I get access to my file again, although I'm pretty sure my syntax is correct.]]>