Chapter Contents

Previous

Next
The TABULATE Procedure

Example 5: Summarizing Information with the Universal Class Variable ALL


Procedure features:
PROC TABULATE statement options:
FORMAT=
TABLE statement:
ALL class variable
concatenation (blank operator)
format modifiers
grouping elements (parentheses operator)
Data set: ENERGY
Formats: REGFMT., DIVFMT., and USETYPE

This example shows how to use the universal class variable ALL to summarize information from multiple categories.



Program

 Note about code
options nodate pageno=1 linesize=64 pagesize=60;
proc tabulate data=energy format=comma12.;
 Note about code
   class region division type;
   var expenditures;

 Note about code
table region*(division all='Subtotal')
         all='Total for All Regions'*f=dollar12.,








 Note about code
         type='Customer Base'*expenditures=' '*sum=' '
         all='All Customers'*expenditures=' '*sum=' '










 Note about code
      / rts=25;


 Note about code
   format region regfmt. division divfmt. type usetype.;
   title 'Energy Expenditures for Each Region';
   title2 '(millions of dollars)';
run;


Output

The universal class variable ALL provides subtotals and totals in this table. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.