I have a data set that contains the following:
1. Start date for an individual registered in a program
2. End date for an individual registered in a program
3. Blank as the person is still in the program
Note the entries are as follows:
Person 1 Row 1 Column start date, column end date,
Person 1 Row 2 (for second start date) column state date, column end date
Person 1 Row 3 Column start date, column end date,
Person 2 Row 1 Column start date , column end date
Some person have one row. Some have multiple rows. Each time they joined the program. Some end dates are blank because during the data pull they were still on.
I want to create a column of data that tells me the number of days an individual was registered for a program.
However, for individuals that ended a program for less than six months you count it as they have never left the program.
In other words,
person 1, start date Jan 2021 and end date March 2021 start date again in separate row June 2021 and end date December 2021. They are counted as being on for 365 days. If the gap was more than six months then it would be counted as two separate registrations and you would count from start to end date.
Only one count should be reported in one row per person when it comes to multiple start and end dates.
Bookmarks