Creating a Data Source Filter

Adding a filter to a data source involves creating filter conditions, specifying when the filter should refresh, and naming the filter.

A filter will have no effect until you apply it to the grid, question, or expression intended to consume the filtered data.

Implementation:

  1. Switch to the Definition tab.
  2. Click to open the Model Data Sources window.
  3. Select the intended data source.
  4. If you have not already checked out the data source, do so by clicking .
  5. Click Filters.
  6. (T-SQL data sources only) Click .
  7. (Other types of data source) Click Add.
  8. Enter an appropriate Filter Name.
  9. Use the Field menu to choose which data source field you want the filter condition to examine.
  10. Choose an Operator.
  11. Choose a Condition Type.
  12. Enter a Condition. How you do this will depend on the chosen condition type - for example, if the condition type is Text, you will need to type the condition into the free text field provided.
  13. If you plan to add another condition after this one, use the And/Or drop-down menu to select how this condition will relate to the subsequent one. Otherwise, leave this field alone.

If you add subsequent conditions to this filter at a later date, you must remember to modify the And/Or setting of the previous last condition so that it can be evaluated with any conditions that follow it.

  1. Click Add.
  2. Repeat steps 9-14 until the filter has all required conditions.
  3. If you want the filtered data to be refreshed whenever values affecting the filter's conditions change, tick the Refresh This Data Source When check box and select The Filter Condition Changes radio button.
  4. Click Save and confirm the save when prompted.
  5. If you want the filtered data to be ordered by one or more of its fields, click Order By, then use the resulting dialog to apply a sort order. Click OK to close the dialog, then save the filter again.
  6. Click Close.