So here is my code. It works for rotating the dataset I need it to, however, I cannot seem to rid myself of the missing values in the output table. My instructor says "do not output an observation if the value is missing." Anyone know how you do that?
libname bst5030 '/folders/myfolders/sasuser.v94/Data for classes 8 to 11 (2)';
data rotate sixmonths_Long (keep= customer_ID Month Sales);
set bst5030.orders_midyear;
array mon[6] Month1-Month6;
do Month=1 to 6;
Sales=mon[Month];
output;
end;
run;
Proc print data=sixmonths_Long;
run;
If not missing(sales) then output;
If not missing(sales) then output;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: