Another thing to consider is that you can use SASHELP files, like SASHELP.SHOES or SASHELP.PRDSALE or SASHELP.CLASS to try to come up with a structure that you like and -then- the only thing that needs to be posted is the code and possibly a snippet of the output that you want to change. For example, if I use this PROC REPORT program on SASHELP.SHOES:
[pre]
options nodate nonumber nocenter;
proc report data=sashelp.shoes nowd;
where region in ('Asia', 'Africa', 'Canada')
and product contains 'Dress';
column region product sales;
define region /group;
define product / group;
define sales / sum;
break after region / summarize;
compute after region;
line ' ';
endcomp;
run;
[/pre]
I get this output:
[pre]
Region Product Total Sales
Africa Men's Dress $318,500
Women's Dress $374,308
Africa $692,808
Asia Men's Dress $119,366
Women's Dress $78,234
Asia $197,600
Canada Men's Dress $920,101
Women's Dress $989,350
Canada $1,909,451
[/pre]
Note how the region name is repeated on the summary line. If I wanted to CHANGE what appears on the summary line, perhaps instead of Asia,
I want to see Attrition Sum on the summary line:
[pre]
Region Product Total Sales
Africa Men's Dress $318,500
Women's Dress $374,308
Africa $692,808
Asia Men's Dress $119,366
Women's Dress $78,234
Attrition Sum $197,600
Canada Men's Dress $920,101
Women's Dress $989,350
Recruitment Sum $1,909,451
[/pre]
That is possible with a COMPUTE block in PROC REPORT. But, maybe you're using PROC TABULATE or PROC SQL -- without any idea of what
procedure you're trying to use or what your table structure looks like, it's very hard to come up with anything helpful.
cynthia
code that created last output is below
[pre]
proc report data=sashelp.shoes nowd;
where region in ('Asia', 'Africa', 'Canada')
and product contains 'Dress';
column region product sales;
define region /group;
define product / group;
define sales / sum;
break after region / summarize;
compute before region;
holdreg = region;
endcomp;
compute after region;
if holdreg = 'Asia' then region = 'Attrition Sum';
else if holdreg = 'Canada' then region = 'Recruitment Sum';
line ' ';
endcomp;
run;
[/pre]