Features: |
DEFINE statement options: GROUP |
Other features: |
FORMAT procedure |
Data set: | GROCERY |
Format: | $MGRFMT |
libname proclib
'SAS-library';
options fmtsearch=(proclib);
proc format; value $perish 'p1','p2'='Perishable' 'np1','np2'='Nonperishable'; run;
proc report data=grocery nowd headline headskip;
column manager department,sales sales;
define manager / group order=formatted format=$mgrfmt.; define department / across order=formatted format=$perish. '';
define sales / analysis sum format=dollar9.2 width=13;
compute after; line ' '; line 'Total sales for these stores were: ' sales.sum dollar9.2; endcomp;
title 'Sales Summary for All Stores'; run;
define manager / group order=formatted format=$mgrfmt.; define department / across order=formatted format=$perish. '';