O'Reilly logo

SAS Certification Prep Guide, 4th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Combining Summary Data and Detail Data

Overview

You have seen how to combine data from multiple data sets. Suppose you want to calculate percentages based on individual values from a data set as compared to a summary statistic of the data. You need to complete these tasks:
  • create a summary statistic
  • combine the summary data with the detail rows of the original data set
  • calculate the percentages
For example, the data set Sasuser.Monthsum has one row for every value of SalesMonth (month and year) from 1997 to 1999. Each row contains information about the revenue generated by an airline.
Table 15.5 SAS Data Set Sasuser.Monthsum (Partial Listing)
Sales Month
RevCargo
JAN1997
$171,520,869.10
JAN1998
$238,786,807.60 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required