This example creates a
separate table for each region
and one table for all regions. By default, PROC TABULATE creates each table
on a separate page, but the CONDENSE option places them all on the same page.
|
options nodate pageno=1 linesize=80 pagesize=60; |
|
proc tabulate data=energy format=dollar12.; |
|
class region division type; |
|
var expenditures; |
|
table region='Region: ' all='All Regions', |
|
division all='All Divisions', |
|
type='Customer Base'*expenditures=' '*sum=' ' |
|
/ rts=25 box=_page_ condense indent=1; |
|
format region regfmt. division divfmt. type usetype.; |
|
title 'Energy Expenditures for Each Region and All Regions';
title2 '(millions of dollars)';
run; |
Energy Expenditures for Each Region and All Regions 1
(millions of dollars)
---------------------------------------------------
|Region: Northeast | Customer Base |
| |-------------------------|
| |Residential | Business |
| | Customers | Customers |
|-----------------------+------------+------------|
|New England | $7,477| $5,129|
|-----------------------+------------+------------|
|Middle Atlantic | $19,379| $15,078|
|-----------------------+------------+------------|
|All Divisions | $26,856| $20,207|
---------------------------------------------------
---------------------------------------------------
|Region: West | Customer Base |
| |-------------------------|
| |Residential | Business |
| | Customers | Customers |
|-----------------------+------------+------------|
|Mountain | $5,476| $4,729|
|-----------------------+------------+------------|
|Pacific | $13,959| $12,619|
|-----------------------+------------+------------|
|All Divisions | $19,435| $17,348|
---------------------------------------------------
---------------------------------------------------
|All Regions | Customer Base |
| |-------------------------|
| |Residential | Business |
| | Customers | Customers |
|-----------------------+------------+------------|
|New England | $7,477| $5,129|
|-----------------------+------------+------------|
|Middle Atlantic | $19,379| $15,078|
|-----------------------+------------+------------|
|Mountain | $5,476| $4,729|
|-----------------------+------------+------------|
|Pacific | $13,959| $12,619|
|-----------------------+------------+------------|
|All Divisions | $46,291| $37,555|
---------------------------------------------------
|
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.