Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Dan_54S
Contributor II
Contributor II

Count purchases by customers in their first week or month since signing up

I am trying to use set analysis to create a visualization showing the number of purchases customers make in their first 30 days since registering, regardless of when that was (they could have registered this month, or 2 years ago, or anytime). 

Relevant fields in my data include

order_date: timestamp of each order

date_registered: timestamp of when each user signed up

order_id: number assigned to each purchase

 

So far I have tried many variations, including:

count({$<[order_date]={">=$(=[date_registered])<=$(=[date_registered]+30)"}>}distinct order_id)

and

count({$<[order_date]-[date_registered={'<30'})}>}distinct order_id)

But no success. Any ideas or tips would be highly appreciated.

 

 

Labels (4)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III


try something like
=Count({$<order_id= {"=order_date>= date_registered"}>}order_id)

View solution in original post

2 Replies
dplr-rn
Partner - Master III
Partner - Master III


try something like
=Count({$<order_id= {"=order_date>= date_registered"}>}order_id)
Dan_54S
Contributor II
Contributor II
Author

Thanks, that did the job! I thought I had tried something similar, but apparently not quite.

If I also want to filter that to exclude data for the last 30 days from today, how might I add that? I'm trying to create a line graph, and I don't want to show customer purchases in their first 30 days for days less than 30 days ago, as those days will of course show deceptively low totals because they haven't yet had time to achieve their full results.