MicroStrategy ONE
Logical Operators
Logical operators allow the application of certain conditions to two sets of filter expressions simultaneously. There are three basic logical operators:
- Union behaves as the inclusive term OR does in grammar. The union of two sets yields a TRUE value any time that either or both of the sets of filtering criteria are met.
- Intersection behaves as the term AND does in grammar. The intersection of two sets yields a TRUE value only when both sets of filtering criteria are met.
- Exclusion behaves as the term AND NOT does in grammar. When two sets of filtering criteria are linked in this manner, their combination yields a TRUE value only when the first set is met, and the other set is not satisfied.
The following tables show the combinations possible with each logical operator, and the value that each combination yields, using the following filtering criteria as an example:
A =(customers located in the) Northeast region
B =(customers that purchased) blankets
Logical Union Filter: A OR B
Possible filter combinations resulting from the union of attributes A and B (customers that either are located in the Northeast region OR have purchased blankets) are as follows.
|
A |
B |
Result Displayed |
1 |
TRUE |
TRUE |
customers located in the Northeast region OR customers that purchased blankets |
2 |
FALSE |
TRUE |
customers that purchased blankets (but are not located in the Northeast region) |
3 |
TRUE |
FALSE |
customers located in the Northeast region (but have not purchased blankets) |
4 |
FALSE |
FALSE |
no display (customers that are neither located in the Northeast region nor purchased blankets) |
Because a union of two sets yields a valid result if data corresponding to either set is found, this filter causes a display as shown in rows 1, 2, and 3.
Logical Intersection Filter: A AND B
Possible filter combinations resulting from the intersection of attributes A and B (customers that are located in the Northeast region AND have purchased blankets) are as follows.
|
A |
B |
Result Displayed |
1 |
TRUE |
TRUE |
Customers that are located in the Northeast region AND have purchased blankets |
2 |
FALSE |
TRUE |
No display (customers that purchased blankets but are not located in the Northeast region) |
3 |
TRUE |
FALSE |
No display (customers that are located in the Northeast region but have not purchased blankets) |
4 |
FALSE |
FALSE |
No display (customers that neither are located in the Northeast region nor have purchased blankets) |
Because an intersection of two sets yields a valid result only if data corresponding to both sets is found, this filter causes display as shown in row 1, and in no other combination.
Logical Exclusion Filter: A AND NOT B
Possible filter combinations resulting from the not (and not) exclusion of an attribute (for example, B) (customers that are located in the Northeast region AND have not purchased blankets) are as follows.
|
A |
NOT B |
Result Displayed |
1 |
TRUE |
TRUE |
Customers who are located in the Northeast region AND have not purchased blankets |
2 |
FALSE |
TRUE |
No display (customers who have not purchased blankets AND are not located in the Northeast region) |
3 |
TRUE |
FALSE |
No display (customers that are located in the Northeast region AND have purchased blankets) |
4 |
FALSE |
FALSE |
No display (customers not located in the Northeast region who have purchased blankets) |
The behavior of exclusive * not (and not) statements is the same as that of intersections—the combination yields a valid result only when data corresponding to the "included" set is found and data corresponding to the "excluded" set is not. This filter causes display as shown in row 1 and in no other combination.
Logical Exclusion Filter: A OR NOT B
Possible filter combinations resulting from the + not (or not) exclusion of an attribute (for example, B) (customers that are located in the Northeast region OR have not purchased blankets) are as follows.
|
A |
B |
Result Displayed |
1 |
TRUE |
TRUE |
Customers who are located in the Northeast region OR have not purchased blankets |
2 |
FALSE |
TRUE |
Customers who have not purchased blankets OR are not located in the Northeast region |
3 |
TRUE |
FALSE |
Customers that are located in the Northeast region OR have purchased blankets |
4 |
FALSE |
FALSE |
No display (customers not located in the Northeast region who have purchased blankets) |
The behavior of exclusive or not statements is the same as that of unions—the combination yields a valid result when either data corresponding to the "included" set is found or data corresponding to the "excluded" set is not. This filter causes display as shown in rows 1, 2, and 3.