A filter on one or more columns reduces unwanted data in reports. For example, financial reports for the current fiscal year may need data from the previous fiscal year for comparison, but nothing earlier. It's good practice to filter out irrelevant data to reduce the size of query results and processing time.
Also, reports based directly on the Domain can define their own filters. Putting often-used filters in the Domain design avoids the need for each user to define filters independently and also reduces the chance for errors.
You can define a filter on a column you don't plan to expose in the Domain. The filter remains active and only data that satisfies all defined filters appears to report users. For example, you can filter data to select a single country, in which case it doesn’t make sense for the column to appear in a report. However, you should clearly document such data restrictions in the description of the Domain, so users understand what data is accessible through the Domain.
To define a filter:
1. | Double-click a column in Fields. |
Alternatively, you can drag a column to the Filters panel. The column appears in the Filters panel with a list of conditional operators you can apply to that column.
2. | Choose the comparison operator and filter value from the drop-down. |
In the Filters panel, the choice of comparison operators depends on the column's datatype. For example, strings offer a choice of search operators and dates offer time comparison operators. The filter value depends on the datatype and comparison operator. For example, if you select a date column with the is between operator, the Filters panel displays two calendar widgets for specifying a date range:
|
Filters Panel of the Domain Designer |
Text columns have both substring comparison operators such as starts with or contains and whole string matching such as equals or is one of. When you select a whole string matching operator, the panel displays a list of all existing values for the chosen column, retrieved in real-time from the database. If more than 50 values are available, use search to narrow the list. For multiple value matching, double-click the available values to select them. You may perform multiple searches and select values from each list of results.
|
To define a filter that compares two columns of the same datatype, Select both columns, and drag them to the Filters panel. |
3. | Click OK to define the filter. |
Filters shows all the filters you have defined. The overall filter applied to the data is the logical AND of all conditions you defined.
In Filters, click Change to modify a filter you defined. Click OK to save the changes. To remove a row from the list, select it and click Remove.