Filtering Queries

The simplest way to filter a query is to apply filters individually to topic items.

  To filter a query:

  1. Select an item in the data model and choose Query), then Add Filter(s).

    The Filter dialog box is displayed.

  2. Select an arithmetic or logical operator from the list.

  3. Define the potential filter values:

    • Show Values—Shows database values associated with the item.

    • Custom Values—Supplies an empty field for inputting custom values. Click the check mark to add a value to the list of values. You can also display values from a previously saved custom list or values loaded from a file.

    • Custom SQL—Supplies an empty box for typing an SQL clause to be included in the query statement. Choose View, then Custom SQL to check the complete statement logic.

  4. Select the values to include in the filter definition in the Values list.

    Individually select values or click Select all and deselect the values you do not want to include. Only selected items are applied to the filter definition. To create a snapshot of the values, click Select All and then click Transfer to move the variables to the Custom Values.

  5. When the correct values are highlighted in the Values list, click OK.

    The filter is applied to the topic item and an icon is added to the Filter line.

    In the Query section, the filter is applied when you process the Query.

    Note:

    When placing a filter on an aggregate item (computed with a data function) in the Query section, a filter divider is displayed and the filter icon is placed to the right. The divider indicates the filter is in the SQL Having clause. You must drag the aggregate item from the Request line to the Filter line to create a filter on an aggregate item.