
Contributor II
2019-03-12
11:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
927 Views
1 Solution
Accepted Solutions

Partner - Master III
2019-03-12
12:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try something like
=Count({$<order_id= {"=order_date>= date_registered"}>}order_id)
2 Replies

Partner - Master III
2019-03-12
12:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try something like
=Count({$<order_id= {"=order_date>= date_registered"}>}order_id)

Contributor II
2019-03-13
05:29 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
889 Views
