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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.