I've been tasked with doing a complicated transpose of a dataset that I have never done before and keep getting hung up. I need to do this transpose for over 600 different datasets and then stack them on top of one another for later use. Each dataset has about 15 unique variables but it varies across data sets. Currently the data looks like this key report date state animal cost homes rcosttohome startdate 1234 01/01/01 CA cats 20 30 .50 02/03/04 2356 01/01/01 NC dogs 30 34 .75 03/04/06 1288 01/01/01 TX cows 40 86 .83 07/08/09 I need to to look like this key report_date VAR_NAME ALL_CHARACTER ALL_Number ALL_RATIO ALL_DATE 1234 01/01/01 state CA . . . 1234 01/01/01 animal cats . . . 1234 01/01/01 cost . 20 1234 01/01/01 homes 30 1234 01/01/01 rcosttohome .5 1234 01/01/01 startdate 02/03/04 and it repeats for each key. The data table will eventually be very very long. I already have created a macro variable &varlist. that identifies all the variables that need to become rows in the transpose. But I am having a hard time consolidating like values into their respective columns. Thank you for any help you can offer!
... View more