Hi All:
I have a dataset that I run through a PROC TRANSPOSE so that data is across rather than down.
As a result of this the number of resulting variables could be 1 to who knows how many - even our client
can't pin down the number of permutations that this will generate. (It is a reasonable number - most likely
less than 20).
Currently, the client report is generated with a PROC REPORT. The data coming from the transpose
is to be merged onto the data currently on the client report.
Is there some way to tell the PROC REPORT to include VAR1 - VARx ? Currently the PROC REPORT is
highly structured with define statements for each variable because the output uses ExcexXP.
Thanks in advance.
This is probably a little simple-minded for your purposes, but it does in fact work (9.3 TS1M2 on Win 7), assuming your variables out of Transpose are similarly-named.
data one;
input id x1 x2 x3;
datalines;
1 1 2 3
2 4 5 6
3 7 8 9
;;;;
run;
proc report data=one nowd;
columns id x:;
define id / order;
define x: / display;
title "Tester";
run;
HTH,
Karl
I've often wondered why the DEFINE statement supports the "SAS Variables List" but not the "List of SAS Variables". :smileygrin:
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.