Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with Date Range

I have a requirement to show average orders by date range (3 months/6 months/9 months, etc) prior to placing an order using the selected coupon to measure effect of coupon usage on ordering habits.

I'm really not sure how to go about this, so I created a test doc with some sample data to share.  I assume there would be set analysis to identify customers who have ever used the coupon selected in the filter, but i'm unsure of where to go from there. I need to then get the MIN order date where that coupon code appears for each customer, and count the number of orders in each date range prior to that first coupon use date.  Once I have the count of orders by customer in each date range, i want to average that count by date range grouping to populate the bar chart.

Maybe I'm making this too difficult, but it's seeming like it's much more complex to accomplish than it sounds.  It's easy to do if there is a single date to calculate everything from or a finite number of coupon codes - I could do calculations in the script.  But the calculation needs to be based on the date each individual customer first used the coupon, and the list of coupon codes grows all the time.

Has anyone else encountered a request like this?  I've attached a test app that shows an example of the data I have to work with.

2 Replies
MK_QSL
MVP
MVP

Would like to help you but unclear about your requirements even after reading your question.

could you please explain with one example from your sample data?

Not applicable
Author

If a user selects coupon code 'DEF', i need the bar chart to show for anyone who has ever used coupon DEF, the average number of orders they placed in the 3 months prior to their first use of that coupon. the 6 months prior, etc.