4.7. Adding Subtotals to a Data Table

The previous section showed how you can create new columns that summarize all the rows in a data table. This section shows how to summarize all the rows that belong to a group. The steps are the same as adding a grand total, with the additional step of selecting a group column.

Here is a sample of the results from the previous section where the SUM_OF_AdDollars column contains the total of the AdDollars column. To calculate the total amount spent by each office instead of the grand total, all you need to do is add a group column to the query. Re-open the query by right-clicking the query icon in the Project Explorer or Project Designer and selecting Open. This opens the Query Builder window.

Summarizing ...

Get The Little SAS® Book for Enterprise Guide® 4.1 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.