Format Large Numbers
The goal in using formats
is to display the values in your table so that they are easy to view
and understand. When you are dealing with large numbers, this can
be a challenge.
The following code produces
a table with some large dollar values:
PROC TABULATE DATA=TEMPBIG; CLASS SECTOR OCCUP; VAR INCOME; TABLE SECTOR, OCCUP*INCOME=' '*SUM=' ' / BOX='Total Income'; RUN;
Because we did not specify
a format, the default BEST12.2 format was used. In Output
10.11, we have a mess. Some of the numbers have two decimal
places, some have one, and some have none. All of the numbers are
very hard to read.
Output 10.11 Table with Large, Unformatted Dollar Values
Because these values are dollars, we can switch to a more appropriate ...
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.