Hi,
I am trying to use PROC TRANSPOSE to transpose from wide to narrow and entire dataset.
This is what I have.
ID | SALARY | NAME | HIRE_DATE | BONUS | DEPT |
---|---|---|---|---|---|
001001 | 100,000 | JONES SMITH | 01012010 | 10,000 | ADMIN |
001002 | 58,362 | HARRY WIZARD | 02052005 | 5,600 | SALES |
001003 | 85,254 | JOHN ADAMS | 10102009 | 3,055 | SALES |
This is the expected outcome I need.
ID | 001001 | 001002 | 001003 |
---|---|---|---|
SALARY | 100,000 | 58,362 | 85,254 |
NAME | JONES SMITH | HARRY WIZARD | JOHN ADAMS |
HIRE_DATE | 01012010 | 02052005 | 10102009 |
BONUS | 10,000 | 5,600 | 3,055 |
DEP | ADMIN | SALES | SALES |
I am trying to use PROC TRANSPOSE, but I havent been able to obtain the expected result. Any help?
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.