Hello,
I have this data that I want to transpose.
The data looks like this
Name
Jake
Sophomore
Name
Abigail
Senior
Name
Ronny
Freshman
I have been trying to create a count where it will display a unique identifier for each group of info like this
Name 1
Jake 1
Sophomore 1
Name 2
Abigail 2
Senior 2
Name 3
Ronny 3
Freshman 3
I can only seem to create a count that starts over when the name row appears, hence it goes 1,2,3 instead of 1,1,1 for each group of data. Any help would be much appreciated
Why do you want to transpose this?
data want;
set have;
if string='Name' then count+1;
run;
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.