Procedure features: |
PROC REPORT statement options:
|
COMPUTE statement:
| with a computed variable as report-item | |
DEFINE statement options:
|
|
Other features: |
CHART procedure
|
Data set: |
GROCERY
|
Formats: |
$SCTRFMT.
|
The report in this example
- creates a
computed variable
- stores it in an output data set
- uses that data set to create a chart based on the computed variable.
libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=64 pagesize=60
fmtsearch=(proclib);
| title;
proc report data=grocery nowd out=profit; |
| column sector manager department sales Profit; |
| define profit / computed; |
| /* Compute values for Profit. */
compute profit;
if department='np1' or department='np2' then profit=0.4*sales.sum;
else profit=0.25*sales.sum;
endcomp;
run; |
This is the output data set created by PROC REPORT. It is used as input
for PROC CHART.
|
|
|
| title;
options nodate pageno=1 linesize=80 pagesize=60
fmtsearch=(proclib);
proc chart data=profit;
block sector / sumvar=profit;
format sector $sctrfmt.;
format profit dollar7.2;
run; |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.