Building the Smart Query

To build a Smart Query, you apply composite filters to select unions, complements, and intersections of members from the different sets. Unions are selections of members that belong to either but not both of two sets. Intersections are selections of members that belong to all specified sets. Complements are selections of members of one specified set that are not members of another specified set.

You can use sets and composite filters in any combination to create highly complex Smart Queries.

Union of Sets

To select members that belong to either but not both sets, define two or more filters as described in Defining Set Filters from the dimension in Sets for.... For example, in Figure 9-1, the query will return only Product, Level 0 members that are either packaged in cans (Product = Can) or are caffeinated (Product = Caffeinated_True).

Figure 9-1 Union of Sets


Union of sets as described in the preceding paragraph.

Intersection of Sets

Intersections include only the members that are common to all specified sets.

To select members common to all specified sets:

  1. Define a filter for a set as described in Defining Set Filters.

  2. Click the arrow next to the filter name and select Add Filter.

  3. Additional Filters and a subset filter are displayed.

  4. Define the second filter.

In Figure 9-2, the query will return only Product, Level 0 members that are caffeinated and packaged in a can.

Figure 9-2 Intersection of Sets


Intersection of sets as described in the preceding paragraph

Complement of Sets

To select only members of a set that are not members of another specified set.

  1. From Filters for..., click the arrow next to a filter name and select Add Filter.

    Additional Filters and a subset filter are displayed.

  2. Define the second filter.

  3. Click the arrow next to Additional Filters. and select Exclude.

In Figure 9-3, the query will return only Product, Level 0 members that are caffeinated but are not packaged in a can.

Figure 9-3 Complement of Sets


Complement of sets as described in the preceding paragraph

When you have built the Smart Query, proceed to Completing the Smart Query.