I have a data set with some student ids and the dates they were in attendance along with the number of classes they had taken on that particular day of attendance. Another data set with all the calendar days are also available. I want to flag those students that have taken more than 6 classes over a rolling 7 calendar day period. The goal is to identify the dates that the student exceeded that threshold, in other words the same student could have met that threshold on multiple dates. Any idea how I would be able to do that?
Any help is much appreciated.
Thanks !
It would help to provide some example data and what you would like to see for a final output. You can follow instructions from this link https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to create datastep code as text to post to the forum to create example data sets we can test code with.
It will help if your dates as SAS date values.
To get an answer to your question please post:
Example test data, in the form of a datastep - copied and pasted into the text box here so we can run it to get test data. You can extract this form your data by following the post at:
The post an example - directly into the text box here - of what the output should look like. Most people will not download random Excel files from the web.
Finally provide any additional information on what the process is about.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.