Quote:
Originally Posted by OCM
Everything remains the same what changed is that we are looking for individuals with H0004 and then getting the other codes within the same week (within 7 days).
|
From your workbook example, it looks more like you want to get all codes for ID when in week around/after of H0004 aren't any other codes, not codes for one week
Some details are missing for me!
Are you meaning week as calendary unit, or as 7-day time period?
When week is calendary unit, then do you use US calendary (the week starts with Sunday) or ISO Calendary (the week starts with Monday)?
When week is 7-day time period, then does it apply to dates before and after H0004 (13 days total), or only for dates after H0004 (7 days total)?
Must all conditions apply for all H0004 codes for same ID, or only for latest one (e.g. what happens when in year 2018 was H0004 with another code in next day, but in year 2019 was H0004 without any other code less than 7 days apart)?
How must rows with no dates handled?