A filter specifies the conditions that the data must meet to be included in the report results. Using a filter on a report narrows the data to consider only the information that is relevant to answer your business question, since a report queries the database against all the data stored in the data warehouse. Filters are an easy way to answer both simple and complicated business questions.
Filters are helpful in clarifying large quantities of data and only displaying subsets of that data, so reports show users what they really need to see. For example, you want to determine the number of injuries to your delivery personnel in 2005 that may have been due to bad winter weather in the northeastern U.S. You also want to know the time of day when most injuries occurred. You place the Delivery Location and Delivery Time attributes on your report. You also place the Number of Reported Injuries metric on the report. But you only want the report to display injuries in your northeast region during the winter of 2005. Without a filter, you would have to sift through a lot of report data on your own. By creating a filter that includes Northeast Region, January 2005, and February 2005, and using that filter on the report, the data displayed when the report is executed is limited to that geographical region and season.
A filter is composed of at least one qualification. Qualifications are the actual conditions that must be met for the data to be included on a report. Examples include "Region = Northeast" or "Revenue > $1 million". The different types of qualifications are fully described in Types of qualifications. You can create multiple qualifications for a single filter, and then combine the qualifications using logical operators.
For example, consider the following diagram, which shows a list of last names filtered with three different conditions:
Each filter definition shown above returns a different result set. Filters ensure that the report results contain only the data that answers the specific business query the report was designed to answer. It is important to design the correct filter to retrieve the desired data.
Filters are most commonly used on reports, to filter all the data the report would otherwise retrieve from the data source and display to users. However, filters can also be used with a specific object on a report, such as on a metric. A filter placed on a metric only filters data related to that metric. When used on a metric, a filter essentially "goes with" the metric so that whatever report the metric is placed on, the filter is always part of that metric. (This type of metric is called a conditional metric. For details, see About conditional metrics.)
Filters are an important part of almost all reports. Understanding how to create a filter is an important skill in making the best use of the data in your data source. This section describes the different types of filters available in MicroStrategy and shows you how to create a simple filter of each type.
Basic knowledge of formal logic is useful in understanding report filters and their concepts, but it is not a prerequisite to learn how to create filters.
A note on terms: filter, qualification, condition
A filter is composed of one or more qualifications. Qualifications define the conditions that the data must meet to be included in a report, for example, "Region = Northeast" or "Revenue > $1 million". If a filter contains more than one qualification, the qualifications are joined by an arithmetic operator such as AND or NOT. For details on using operators to join filter qualifications, see Joining view filter qualifications with operators.
Stand-alone filters vs. filters within a report
Stand-alone filters, created in the Filter Editor, can be added to reports, metrics, templates, and other filters. You can also create a filter within a report, while you are creating or editing the report. A filter created within a report can only be used in that particular report; it cannot be saved independently of the report and used in a different object. For more information on these report filters and view filters, see Creating filters in reports.
Security filters are similar to regular MicroStrategy filters, but they have a limited number of qualification types they can be defined with, and they apply to a user or group for all reports across a project. For information about security filters and steps to create a security filter, see the Advanced Reporting Help.
Filters in a multilingual project
The result returned by a filter in a project that has data internationalization enabled will depend upon the locale (preferred language setting) of the user that created the filter as well as the locale of any other user that is accessing the filter. The following example illustrates the effects:
The category Movies has names and descriptions in both English and German. A user with an English locale creates a filter that returns only categories with a description that includes Mov, and places it on a report. This report will return the category Movies for any user with an English locale. If a user with a German locale runs the same report, the category Filme (the German name for the category Movies) will be displayed. Because the filter was created by an English user, the report returns objects that contain Mov in their English description, regardless of the locale of the user running the report.
If the same filter were created by a German user, the report would return no results. This is because there are no objects that contain Mov in the German category description.