Hi there, Below array I have used put the multiple records in one row by using date (take if first date and keep the rest dates in line next to the first date). But when I check the records if the first date carries the related records of first date, I am seeing problem (it is taking the late dates records into it, you can visually see it below). Is there any way to move the dates upper (to the first column) so that I will have rent, color , location info that belongs to the first date? Please see my array code below: Many Thanks in advance. Best, Emel ****** HOW IT LOOKS LIKE**** ID date 1 date 2 date 3 rent, color, location 1 1/1/2011 1 1/1/2011 1 1/1/2011 2/1/2012 5/1/2014 **USED ARRAY CODE***; data V9; set V8; by ID DATE; retain index 0 ic1-ic3 dt1-dt3; format dt1-dt3 mmddyy10.; array ic(3) ic1-ic3; array dt(3) dt1-dt3; if first.ID then do; index=0; do i=1 to 3; ic(i)=.; dt(i)=.; end; end; index=index+1; ic(index)=ID; dt(index)=DATE; output; drop i index; run; data V10; set V9; by ID DATE; if last.ID; drop ID DATE; run;
... View more