data wide_arrays (drop=Actual i Date); set PrdSummary; where year(Date)=1997; by Product; array months {12} Act_Jan Act_Feb Act_Mar Act_Apr Act_May Act_Jun Act_Jul Act_Aug Act_Sep Act_Oct Act_Nov Act_Dec; retain Act_Jan Act_Feb Act_Mar Act_Apr Act_May Act_Jun Act_Jul Act_Aug Act_Sep Act_Oct Act_Nov Act_Dec; format Act_Jan Act_Feb Act_Mar Act_Apr Act_May Act_Jun Act_Jul Act_Aug Act_Sep Act_Oct Act_Nov Act_Dec dollar12.2; if first.Product then do i=1 to 12; months{i}=0; end; months{month(Date)}+Actual; if last.Product; run; proc print data=wide_arrays; id Product; title1 "Rotated results for a single year"; run;