From the course: SAS® 9.4 Cert Prep: Part 05 Analyzing and Reporting on Data
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Segmenting reports - SAS Tutorial
From the course: SAS® 9.4 Cert Prep: Part 05 Analyzing and Reporting on Data
Segmenting reports
- [Instructor] Another way to enhance reports is to segment them. You can use the BY statement in a reporting procedure to segment a report based on the unique values of one or more columns. To do this you must sort the data first using the same BY-column. For example, suppose we want to run the freq procedure so that we have a frequency report of type for each value of origin. First, we use proc sort to sort the table by origin. Then we use the same BY statement in the proc freq step. SAS treats the rows for each value of origin as a separate table and generates the frequency report.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.