Changing PROC TABULATE Subtotals and Totals Style Attributes

A common technique in PROC TABULATE is to create totals at the end of each group of results. PROC TABULATE gives you some basic control over these totals. You can change their labels and format their values. However, if you want to do fancier formatting of your subtotals and totals, you will want to turn to ODS. Subtotals and totals are created using the ALL keyword, as shown in the following code. This table uses ALL twice: the first reference computes subtotals and the second computes totals.

ODS HTML BODY='totals.html' STYLE=sasweb; proc tabulate data=furniture; class Type Material; var Price; table Type='Table Type'* (Material='Construction' ALL) ALL, Price='Average Price'*Mean=" ...

Get Output Delivery System: The Basics and Beyond 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.