BookmarkSubscribeRSS Feed
hwangnyc
Quartz | Level 8

Hi everyone, 

 

I have an excel file that has data that looks like this:

 

Services 
BC-1
0
0
BC-1
MI-1
0
BC-1
PC-1
MI-1
Assess B-1
BC-1
HR-1
MHA-1
CC-1
Assess B-1
BC-1
HR-4
BN-1

 

What I would like to do is transpose each category into  a column from  each cell. So what I would like is:

 

BCMIPCAssessBHRBNMHACC
10000000
00000000
00000000
11000000
00000000
11100000
10011010
00000001
10010000
00004000

 

Any help would be greatly appreciated thank you! 

1 REPLY 1
Patrick
Opal | Level 21

@hwangnyc 

Looking at your Have and Want data I can't figure out the transpose logic. Can you please elaborate?

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 578 views
  • 0 likes
  • 2 in conversation