I have a data set structured like below. ID Date Status x 1/31/2017 0 x 1/31/2017 0 x 2/28/2017 1 y 1/31/2017 0 y 2/28/2017 1 z 1/31/2017 0 z 1/31/2017 0 I want to get the maximum value of column status 1 year from actual date. to do this i am using proc sql but it isn't functioning as it should (i am quite new to this). what i want to get is: ID Date Status Status after 1 year 1 12/31/2016 0 0 1 1/31/2017 0 1 1 1/31/2018 1 what i get: ID Date Status Status after 1 year 1 12/31/2016 0 1 1 1/31/2017 0 1 1 1/31/2018 1 1 The code i have used: Proc sql; Select Customer ID, Date, Status, Max (Status) as Status after 1 year from db t1 where Date between t1.Date and t1.date + 365 group by Customer ID, Date thank you in advance. is there any way to do this without proc sql? if not could you please provide any hint on how to proceed? I am using sas enterprise guide 7.1
... View more