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 🙂
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.