Note: If you make changes in one row and then edit cells in another row, the changes in
the first row are automatically saved. When you select File ð Close, you are
prompted to save the pending changes to the second row.
Subsetting Data By Using the WHERE Expression
Subset Rows of a Table
In the VIEWTABLE window, you can subset the display to show only those rows that
meet one or more conditions. To subset rows of a table, follow these steps:
1. In the Explorer window, open a library and double-click the table that you want to
subset.
In this example, the Cars data table is selected.
2. Right-click any table cell that is not a heading and select Where from the menu.
The WHERE EXPRESSION window appears.
390 Chapter 17 Managing Your Data in the SAS Windowing Environment
3. In the Available Columns list, select a column, and then select an operator from the
Operators menu.
In this example, Make is selected from the Available Columns list, and EQ (equal
to) is selected from the Operators menu. Note that the WHERE expression is being
built in the Where box at the bottom of the window.
4. In the Available Columns list, select another value to complete the WHERE
expression.
In this example, scroll to the bottom of the Available Columns window and select
<LOOKUP distinct values>.
5. In the Lookup Distinct Values window that appears, select a value.
In this example, Honda is selected.
Subsetting Data By Using the WHERE Expression 391
Note that the complete WHERE expression appears in the Where box at the bottom
of the window.
6. Click OK to close the WHERE EXPRESSION window.
In this example, VIEWTABLE displays only rows where the value of Make is
Honda.
Clear the WHERE Expression
You can clear the WHERE expression that you used to subset your data, and redisplay
all of the data in the table. To do this, follow these steps:
1. Right-click anywhere in the table except in a column heading.
2. Select WHERE Clear from the menu.
The VIEWTABLE window removes any existing subsets of data that were created
with the WHERE expression, and displays all of the rows of the table.
392 Chapter 17 Managing Your Data in the SAS Windowing Environment
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.122.68