I want to transpose the data and how I have and want. Is it possible? dates/time are in datetime16. format in have datasets. I really appreciate any help you can provide.
From now on, even in this small example, would you please provide data not as screen captures but as text in the form of working SAS data step code? (examples and instructions) Thank you. We cannot work with data in a screen capture.
Here is the idea that ought to get what you want on your data. I use a different data set because I cannot work with data in a screen capture.
proc transpose data=sashelp.class(obs=1) out=want prefix=all;
by name;
var height weight age;
run;
Adding: it makes sense (to me) to have dates in a column. It does not make sense (to me) to also have the value of COUNT in the same column as date, and so I would suggest you re-think the layout that your want.
From now on, even in this small example, would you please provide data not as screen captures but as text in the form of working SAS data step code? (examples and instructions) Thank you. We cannot work with data in a screen capture.
Here is the idea that ought to get what you want on your data. I use a different data set because I cannot work with data in a screen capture.
proc transpose data=sashelp.class(obs=1) out=want prefix=all;
by name;
var height weight age;
run;
Adding: it makes sense (to me) to have dates in a column. It does not make sense (to me) to also have the value of COUNT in the same column as date, and so I would suggest you re-think the layout that your want.
@PaigeMiller My apologies; my sample code has not shown up here for some reason. Maybe I did not paste it correctly and just submitted a query. I realized that with your responses. Thanks for helping out. I resolved the issue, Just doing two transposes, one for 'dates' and one for 'count'', then appended.
Thanks.
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.