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 2025: Call for Content

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 481 views
  • 0 likes
  • 2 in conversation