🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 04-16-2021 12:18 AM
(589 views)
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;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If not missing(sales) then output;
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If not missing(sales) then output;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a bunch! I was doing that but I realized that it doesn't work unless I put it BEFORE the statement end.