The SAS Output Delivery System and reporting techniques

Can Proc Report Transpose Columns?

Reply
Contributor
Posts: 20

Can Proc Report Transpose Columns?

Can PROC REPORT perform a transpose of the output? I only have 3 rows but many columns, and the end user wants the rows to appear as columns. In order to do this, I am creating an output dataset from PROC REPORT, transposing that with PROC TRANSPOSE and then running a second PROC REPORT to display the summarized data as requested. This is a quick solution, but it does not work very well for a number of reasons, such as differing number formats on the same column in the second report. There must be a simpler way.
N/A
Posts: 0

Re: Can Proc Report Transpose Columns?

On the face of it - did you try defining each variable as an across variable?

Something like:

PROC REPORT DATA=WORK.HOLIDAYS LS=142 PS=46 SPLIT="/" CENTER NOWD;
COLUMN Holiday Agency_Status Date;

DEFINE Holiday / ACROSS FORMAT= $22. WIDTH=22 SPACING=2 LEFT "Holiday" ;
DEFINE Agency_Status / ACROSS FORMAT= $22. WIDTH=22 SPACING=2 LEFT "Agency_Status" ;
DEFINE Date / ACROSS FORMAT= DATE9. WIDTH=9 SPACING=2 RIGHT "Date" ;
RUN;

I went back a added a quick demo from something I had.


Message was edited by: rwright Ignore me - I completely mis-read what you were trying to do.

This might be better done using COMPUTAB (if you have access to it).


Message was edited by: rwright
Ask a Question
Discussion stats
  • 1 reply
  • 153 views
  • 0 likes
  • 2 in conversation