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?

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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