Add a Filter

Top  Previous  Next

How To... > Work with Collections > Restrict the Cases You See by Filtering Data > Add a Filter

When you want to see only a subset of your collection’s data, you can add a filter to the collection or any object connected with it. A filter applied to the collection filters every object connected to it (graphs, tables, statistical objects); a filter applied to any other object filters only that object.

1.Select the object you want to filter and choose Object | Add Filter.
2.Enter the expression for the filter in the formula editor and click OK.

Appropriate expressions include:

sex = "female"

(age ≥ 21) and (age ≤ 65)

(color = "red") or (color = "green")

The formula for the filter appears on the bottom of the filtered object.

A filtered collection still shows all its cases, but the captions of the filtered-out cases are gray instead of black. A graph or case table attached to a filtered collection will show only the cases that pass through the filter.

Two graphs attached to the same collection can have different filters. This can be useful when you want to compare the results of a display or analysis under two different conditions.

Edit the formula for a filter by double-clicking it.

See also

Restrict the Cases You See by Filtering Data

Delete Cases