Hi all!
I'm having trouble joining my two datasets based on some date logic. I have one dataset with survey response data and another with visitation data. They both have the same unique respondent ID fields, however there are multiple visits and only one response date. I need to match the response data to the visit that happened directly prior to that date. In other words, I need to join the second dataset by respondent ID and the date that is closest (but before) the date in the first dataset.
Based on the similar post "How to Join on a Date Range" I thought maybe I could generate dates for the 7 days prior to the response rate and then do a standard join? I'm not sure how to generate these rows.
Thanks in advance for the help!!
Lauren