Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Dan_54S
New 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.

 

 

Tags (2)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

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


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

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


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

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

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.