A Format Is Not Being Applied to a Variable

Unlike most SAS procedures, where there is only one way to apply formats to your output, PROC TABULATE has several ways to apply formats. Consider the following three ways:
  • using the FORMAT= option in the PROC TABULATE statement
  • using the FORMAT= (or F=) option in the TABLE statement
  • using the FORMAT statement
Unfortunately, these three methods are not interchangeable. This can lead to a lot of confusion when your table does not turn out as expected. For example, look at the following two tables. One table has a format for the analysis variable INCOME. The second table has formats for the two class variables, OCCUP and CTRY.
PROC TABULATE DATA=TEMP; CLASS EDUC AGE; VAR INCOME; TABLE ...

Get PROC TABULATE by Example, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.