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?

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

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