Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table having customer data about Services provided (Beauty center) on a date basis.
Here I have a challenge to find the repeated customers who are visited again for the services within 50 days.
Can some suggest me the logic to find the solution for the same either in script or set analysis .?
Please let me know if you are clear with my question.?
Thanks,
Kishor
Hi
Try like below,
use RepeatCustomerFlag in set analysis to find the repeat customer information.
Load *, Date - PrevDate as NoOfDays, if(Date - PrevDate <= 50, 1, 0) as RepeatCustomerFlag;
LOAD *, If(Customer = Previous(Customer), Previous(Date)) as PrevDate INLINE [
Customer, Date
X, 01-01-2018
X, 31-01-2018
Y, 02-01-2018
Z, 02-04-2018
];