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

Getting value for a dynamic date range using Set Analysis

Hi,

I am new to Set Analysis, appreciate your inputs on the following scenario. I have a table as follows:

Service Number
Service DateCustomer ID
100019/1/20141
100029/2/20141
100039/12/20141
100049/2/20142
100059/5/20142
100069/3/20143
100079/12/20143
100089/4/20144
100099/5/20144
100109/6/20145
100119/21/20145

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!

1 Solution

Accepted Solutions
MayilVahanan

Hi

PFA

hope it helps

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

View solution in original post

6 Replies
Not applicable
Author

Hi

Find out the below app attached and let us know the approach sutis the requirement

Not applicable
Author

small corerction

istead of using "sum" in the expression use "count "

you would get desired result

Not applicable
Author

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.

Not applicable
Author

try for subroutine

if you are not aware of it try to find it out in the community,it may help you

MayilVahanan

Hi

PFA

hope it helps

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

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!!!!