Creating a Simple Filter

The WhereCustomizerDialog for a user's COURSES SAS dataset is shown below. To create a filter to run against this dataset, follow these steps:

Filter window

  1. In the left-hand panel, double-click the name of a column whose values you want to filter. A graphic for the filter appears in the Filter window and the Filter Edit window appears.

    Filter Edit window

  2. In the Filter Edit window, select an operator from the drop-down list. The list only displays valid operators for the selected column type.

  3. In the text box, enter a value the operator can compare against. To choose a value from a list of possible values for the column, click the Distinct Values button. If one of the values in the list is a quote ("), selecting the quote tells the the filter to look for data where the selected column is blank. (For example, CUSTID equal to " finds records that contain a blank for the CUSTID column.)

    In this example, our filter will only pass through rows which have a value of "ROCKVILLE, MD" for the LOCATION column.

    Filter Edit window

  4. If you only want rows that do not meet the specified criteria to through this filter, select the Not checkbox.

  5. If you want unknown values to be included, select the Include Unknown Values checkbox.

    If you want to further define the filter by editing it as a WHERE clause expression, click the Edit SQL button and type your changes.

  6. Click OK. The defined filter appears in the filter area of the dialog box.

    To modify a filter you have already defined, either double-click the filter or select the filter, click the right mouse button, and select Edit. The Filter Edit window appears and displays the filter's current definition, which you can then modify. However, if you have used the Edit SQL button to modify the filter as a WHERE clause expression, the Filter Edit window only allows you to view and edit the filter as an expression.

    Filter example 1