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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.