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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.