I have a census population by counties and age categories in wide format as shown in the Image 2. Can you please help organize it to a narrow format in Image1?
I tried e.g.,: if agecat1 then agecat=1; else
if agecat2 then agecat=2; else ..
which creates only agecat=1.
Image 1: data I want:
Image 2: data I have
Cruise, you should be on cruise control with proc transpose with tons of syntax on a google search
Well done! That's the spirit. Have a good evening. Mark your own answer as correct and please close the thread. Good job mate!
Well, you have. Some original posters never mark an answer and the question stays open for ages. I would assume they want more responses, however if it's simple i seriously wonder why they lack the common sense to know that they are not gonna get any more. lol. Marking the answer is closing the thread.
I'm sure somebody may still come to this thread and offer like, "hey, here is an array solution. lol" that's like peanuts alongside my beer seeing such messages 🙂
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.