BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
swimmer23
Calcite | Level 5

Hello, 

 

I have the following dataset (here is an excerpt from it): 

product_categorypart1part2part3part4
hose_connectorconnector1connector2connector3connector4
printerprinter1printer2printer3printer4
glassesglasses1glasses2glasses3glasses4

 

I want to convert the dataset shown above into the following one:

hose_connectorconnector1
hose_connectorconnector2
hose_connectorconnector3
hose_connectorconnector4
printerprinter1
printerprinter2
printerprinter3
printerprinter4
glassesglasses1
glassesglasses2
glassesglasses3
glassesglasses4

 

Can anyone tell me what SAS command I can use to create this transpose of the data?

 

Thank you in advance for your support. 

1 ACCEPTED SOLUTION

Accepted Solutions
1 REPLY 1
Reeza
Super User
Have you tried PROC TRANSPOSE?

https://stats.oarc.ucla.edu/sas/modules/how-to-reshape-data-wide-to-long-using-proc-transpose/

proc transpose data=have out=want;
by product_category;
run;