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 Furniture sales data table is selected.
    VIEWTABLE window
  2. Right-click any table cell that is not a heading and select Where from the menu.
    The WHERE EXPRESSION window appears.
    WHERE EXPRESSION window
  3. In the Available Columns list, select a column, and then select an operator from the Operators menu.
    In this example, COUNTRY 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.
    WHERE EXPRESSION window
  4. In the Available Columns list, select another value to complete the WHERE expression.
    In this example, <LOOKUP distinct values> is selected.
  5. In the Lookup Distinct Values window that appears, select a value.
    In this example, Canada is selected.
    Lookup Distinct Values window
    Note that the complete WHERE expression appears in the Where box at the bottom of the window.
    WHERE EXPRESSION window
  6. Click OK to close the WHERE EXPRESSION window.
    In this example, VIEWTABLE displays only rows where the value of Country is Canada.
    VIEWTABLE window

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.