Help using Base SAS procedures

Proc Report Computed Variable and Across

Reply
Occasional Contributor
Posts: 9

Proc Report Computed Variable and Across

Having trouble getting this to work. I need the computed field and the other analysis fields to follow underneath the column variable

proc report data=data;

column  row1 row2  column1, (var1 var2 computevar);

define row1/ group  ;

define row2/ group  ;

define column1/ across ;

define var1/ analysis sum ;

define var2/ analysis sum ;

define computevar/ computed;

compute computevar;

computevar = var1.sum/var2.sum;

endcomp;

run;

Any ideas ?

SAS Super FREQ
Posts: 8,868

Re: Proc Report Computed Variable and Across

Hi:

  I believe that if you search the forum for previous postings, you will find many (really, a LOT) of previous postings with code....including one just last week on the same topic. You will want to search on some of these strings:

REPORT ACROSS ABSOLUTE COLUMN NUMBERS or just

REPORT ACROSS calculate.

cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 137 views
  • 0 likes
  • 2 in conversation