Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Set Analysis, appreciate your inputs on the following scenario. I have a table as follows:
Service Number | Service Date | Customer ID |
---|---|---|
10001 | 9/1/2014 | 1 |
10002 | 9/2/2014 | 1 |
10003 | 9/12/2014 | 1 |
10004 | 9/2/2014 | 2 |
10005 | 9/5/2014 | 2 |
10006 | 9/3/2014 | 3 |
10007 | 9/12/2014 | 3 |
10008 | 9/4/2014 | 4 |
10009 | 9/5/2014 | 4 |
10010 | 9/6/2014 | 5 |
10011 | 9/21/2014 | 5 |
Problem: I need to find the distinct number of customers who availed a service for the first time for a date range (say in this case from 9/1/2014 to 9/5/2014) and then came back within 5 days of availing the service. In the above example the count should consider only the customers 1, 2 and 4.
Thank you!
Hi
PFA
hope it helps
Hi
Find out the below app attached and let us know the approach sutis the requirement
small corerction
istead of using "sum" in the expression use "count "
you would get desired result
Hi,
Thanks for your inputs, unfortunately it is not solving the problem i described. This is giving all the customers count for the date range 9/1/2014 to 9/5/2014. I want the count of only those customers who came back within 5 days of availing the first service. In the example i have given the count should consider only the customers 1,2 and 4 as they have come back within 5 days of availing the first service.
try for subroutine
if you are not aware of it try to find it out in the community,it may help you
Hi
PFA
hope it helps
Thanks Mayil!!!!! This solved my problem.
However I am still curious to know if this can be done through set analysis and not add anything to the scripts.
Thank You!!!!