Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comon Customer Problem Urgent

Customer Loyality.GIF

Hello All,

I need a help as you can see in the image above i need a Number of common customer who have done purchasing across consecutive Months.

Like for Jan/Feb/Mar,it should customers who have done shopping in all the three months January ,february and March.

Plz do let me know if you need more information.

PFA the sample data

Regards,

Yashpal SIngh Rawat

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     I think you can do this by creating 12 expression without dimension and it depends maximum date?

     is it ok for your requirement?

Celambarasan

Not applicable
Author

Hello Celambarasan

Plz could you write a single expression so that i can implement the same for 12 expression.   yashpal singh

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this.

     Have a variable with value as

     vCustomers = Concat({<Date={'>=$(=MonthStart(Max(Date),$1))<=$(=MonthEnd(Max(Date),$2))'}>} CustomerID,',')

     =Sum({<CustomerID={$(=vCustomers(0,0))}*{$(=vCustomers(-1,-1))'}*{$(=vCustomers(-2,-2))'}, Date={">=$(=MonthStart(Max(Date),-2))<=$(=MonthEnd(Max(Date),0))"}>} CustomerID,','))},Year=,Month=,MonthYear=>} Sales)

>=$(=MonthStart(Max(Date),-2))<=$(=MonthEnd(Max(Date),0)) in this instead of 2 use 3 and instead of 0 use 1.

Continue this up to 12 and 10

vCustomers(-1,-1) ,vCustomers(-2,-2),vCustomers(-3,-3) for next expr and keeps on going.

Celambarasan