Same answer as before, your output is in the data set want, not in the PDF. You're seeing the output from PROC MEANS in the PDF.
Try opening the WANT data set or printing it at the end. I've made the changes I suggested before to your code below and added the PROC PRINT.
proc means data= WORK.SASExample nway NOPRINT;
class reference date;
format date monyy7.;
var lifetimecostScore;
output out = totals sum=MonthlyScore;
run;
proc transpose data=totals out=want prefix=Date_;
by reference;
id date;
idlabel date;
var MonthlyScore;
run;
proc print data=want;run;
@BarneyC77 wrote:
Hi Reeza,
You're probably right, I'm obviously doing something wrong. I am very new to this. I'm gutted as it's nearly there, but not quite, so my incompetence is clearly causing problems, even given your patience. The entirety of the code I'm using is below and it's generating the attached pdf without any errors, but the months are still appearing as row headers and not column headers, and I'm not sure where/how to insert the noprint to remove the extraneous columns. I've only amended the 'Have' reference to refer to the data source 'WORK.SASExample'.
proc means data= WORK.SASExample nway;
class reference date;
format date monyy7.;
var lifetimecostScore;
output out = totals sum=MonthlyScore;
run;
proc transpose data=totals out=want prefix=Date_;
by reference;
id date;
idlabel date;
var MonthlyScore;
run;
I'm posting again the probably vain hope that you haven't totally lost patience with my incompetence and might still be willing to help, as I'm doing some analysis for work.
Thanks,
Barney
... View more