Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Hello Celambarasan
Plz could you write a single expression so that i can implement the same for 12 expression. yashpal singh
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