SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Tabular Reports
Describing the Table


Three-Dimensional Tables

For a three-dimensional table, you specify three expressions in the following order:

TABLE page-expression,
              row-expression,
              column-expression;

The table below is the first page of a three-dimensional table. The value of Type, the variable in the page dimension, appears above the upper left corner of the table. The variable Premium appears in the row dimension, and the statistic SUM appears in the column dimension.

     table type,premium,sum;

Type I
  Sum
Premium 312.65


This is the second page of the same three-dimensional table. Notice that the value of Type has changed.


Type II
  Sum
Premium 3046.50


Specifying One or More Tables in a PROC TABULATE Step

You must specify at least one TABLE statement in a PROC TABULATE step. You can also use more than one TABLE statement in the same step. But remember that all variables in every TABLE statement must be specified in a CLASS or VAR statement.

     proc tabulate data=clinic.admit;
        class maritalstatus referral;
        var age;
        table referral,maritalstatus,age;
     run;

     proc tabulate data=clinic.diabstat;
        class type sex;
        var totalclaim premium;
        table type,premium;
        table type;
        table sex,totalclaim,type;
     run;

back||next


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

Terms of Use & Legal Information | Privacy Statement