Hi, This can be done easy using proc sql, /* ------*/ proc sql; create view FILTER as /* Creating a view you keep the patient_dataset intact */ select * from <patient_dataset> where Diagnose = <diagnose Id> /* Filter for diagnose, use semicolons if the variable Diagnose is text */ and Date <= '<diagnose date literal>'d /* Filter for date */ ; quit; /* ------*/ Regards
... View more