Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Find a Repeated Customers in the months of Year

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

1 Reply
MayilVahanan

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
];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.