Filter Criteria Concepts

You can use filters to create a subset of a group of items for a table configuration, a calculation input in an indicator, a purging rule, or a download configuration for a remote computer. Each filter can be composed of multiple criteria. For each filtering criterion, consider the following:
The application of Boolean logic differs for table configurations and indicator calculation inputs, and purging rules and download configurations. Data type behavior is the same for all filters.

Boolean Logic for Table Configurations and Calculated Indicators

Boolean logic refers to a searching system that allows complicated queries involving large amounts of data. Three components of Boolean logic apply to creating filtering criteria for table configurations and calculation inputs for asset or performance indicators:

Logical Operators and Filter Groups

When you use more than one filtering criterion, you must establish the relationship between them. APM supports two Boolean operators: AND and OR.
Criteria based on a common attribute or column are considered to be in the same filter group. For table configuration and calculation input filters, you cannot define groups directly. The system always uses the AND operator between different filter groups. For example:
Criteria 1 is “work orders where the Planner is Jane Smith”.
Criteria 2 is “work orders created in the last month”.
These criteria are based on different attributes (Planner and Creation Date). Therefore, the system uses the AND operator. The result is a list of work orders that were created by Jane Smith.
You cannot change the operator used between groups, but you can change it when working with criteria within a group. For example, you may want to see work orders created by both Jane Smith and Jacky Lee:
Criteria 1 is “work orders where the Planner is Jane Smith”.
Criteria 2 is “work orders where the Planner is Jacky Lee”.
If you use the OR operator between these criteria, you get a list of work orders created by both Jane Smith and Jacky Lee. Usually, criteria for the same attribute use the OR operator.

Order of Operations

If you have multiple criteria in one filter group, the order in which you arrange the filtering criteria also affects the results. When there are three or more filtering criteria, APM uses the order of operations rules to determine the order in which to evaluate them. Criteria from the same filter group are evaluated together, with criteria that are connected with the AND operator evaluated before OR operators.
Changing the evaluation sequence can alter the results of the search. For this reason, each filtering criterion has a sequence number. Because you can have different relationships between the criteria within a group, be sure to arrange the criteria in the correct sequence. However, in spite of the sequence number, ANDed criteria are always evaluated first (as though they were bracketed). For example:
1. A = 3
2. or A = 7
3. or A > 11
4. and A < 21
will be evaluated as A=3 or A=7 or (A>11 and A<21).
If you add more criteria for a different attribute, these will be ANDed to the previous group. Each filter group would be evaluated as a unit. For example:
(A=3 or A=7 or (A>11 and A<21)) and (B=1 or B=2)

Boolean Logic for Purging Rules and Download Configurations

When you create purging rules or download configurations for remote computers, you will use the following Boolean logic components:
Sequence numbers are not available on these filter criteria.

Filter Groups

You can create filter groups to specify which criteria are evaluated together. This grouping, when combined with logical operators, determines how criteria are evaluated. Changing the group to which a criterion belongs often yields very different results.
Each filter group is identified by a number. The first criterion that you create is assigned to filter group “0”. By default, each new criterion is added to the same filter group. You can change the group to which a criterion is assigned by entering another group number in the Logical group box on the Filter Criterion dialog. You can add any criterion to any filter group. For example, you might want to evaluate all criteria based on the same attribute within the same group.

Logical Operators

Boolean logic allows you to define the relationship between filter criteria and filter groups. In Boolean searching, an AND operator between two criteria (for example, Title contains “pear” AND “apple”) returns records where the Title contains both values, not just one of them. An OR operator between two criteria (for example, Title contains “pear” OR “apple”) returns records that contain either of the words.
In some cases, two operators allow you to define the relationship between groups and between the criteria within a group. These are:
The default choice is AND within a group, OR between groups. Because each group typically contains only criteria for the same attribute, in most situations it is not necessary to change the default operator.
For example, the following criteria and the AND within a group, OR between groups setting:
are evaluated as: A=3 OR A=7 OR (B>11 AND B<21).
If the logical operator setting is changed to OR within a group, AND between groups and the groups the criteria belong to:
the set is now evaluated as: A=3 OR A=7 AND (B>11 OR B<21).

Data Types

Five sets of data-type-specific operators are available to handle each of the 27 different data types that APM supports. The five types of operators are:
The following types of attributes do not support filtering:

Filtering On Compound Data Types

Multi-part data types are problematic for filtering because they are more complex than simple data types like floats, strings, or integers. For example, the Duration data type is composed of a float and a unit of time. Because the unit of time is not necessarily the same for each item, they must be converted into a common unit of time before the comparisons required for filtering can occur. For example, if you want to see all of the work orders with a duration of less than two days, you should be able to get that result regardless of whether their duration is expressed in days, hours, or weeks.
The following sections explain the filtering behavior for each of the compound data types.

Quantities

A Quantity is a two-part data type comprised of a float and a unit of measure. To filter correctly on this type of attribute, you must take into account the unit of measure. For example, if you ask to see lengths of pipe that are less than four feet long, you expect to see those that are shorter than four feet whether the unit of measure is in feet or in meters.
Filtering based on quantities takes into account the conversion factor between different units of measure, provided that they are within the same category. Any records that have units of measure in different categories are excluded from the filtered list. For example, if the unit of measure used in the filtering criterion is feet (which is in the length category), any record that is not measured in length (for example, liters or pounds) is excluded.

Durations

The Duration data type is also made up of a float and a unit of measure, but the unit of measure is always from the Time category. Examples of durations are: one day, 24 hours, 1440 minutes.
The problem of different units of time is addressed in the same manner as for quantities.

Currency Amounts

The Currency Amount data type is a two-part data type consisting of a currency type and a float. Some examples of currency amounts are $10.00, DEM 7.00, or US$6.00. To correctly filter on this type of column, you must take into account the current exchange rate for the currencies.
Because the use of this data type is very rare in APM, and in cases where it is used the currency is always the same, filtering on this data type works in the same way as filtering on a Float-type attribute. That is, the system ignores the currency part of the attribute.

Prices

The Price data type is a three-part compound data type consisting of a float, a unit of measure, and a currency type. For example, $10.00 each, 400 Euros per meter, and US$6.00 per gallon are all prices.
The filtering behavior for these types of attributes is the same as that for Quantities: prices with units of measure within the same category are compared based on their conversion factor. The system ignores the currency part of the attribute.

Date and Time

The Date and Time data type consists of a date combined with a time. When filtering on this type of attribute, APM ignores the time segment if it is left blank in the filter criterion. In other words, if the time portion is not specified as part of the filter, the column is filtered as if it were a simple date.
When you filter on a date and time attribute, you can filter using conditions such as “Last week”, or “In the last 7 days”. If you select “In the last ...” or “In the next ...” conditions, you can filter on any amount of time.