Restrict using Expression
See Also
This dialog allows you to restrict the rows in the spreadsheet used in an analysis, by the use of a general logical expression. The expression can be built as a conjunction of two boolean expressions compounded with an OR or AND operator. The columns in the spreadsheet are displayed in a list and may be transferred to one of two sub-expressions.

Columns

The columns in the spreadsheet which can be used in the restriction expression. Clicking in an expression edit box, and then double clicking a column name will place this name in the expression at the current cursor position.

Comparisons

Logical operators which can be used in the restriction expression. Clicking in an expression edit box, and then double clicking a comparison name will place the comparison at the current cursor position.

Expression

Two edit boxes to build the restriction expression.

And/Or

The logical conjunction used to compound the two logical expressions.

Create Expression

Open the Form Expression dialog to build the restriction expression.

Restriction Type

Units that meet the specified conditions can be either included or excluded from the restriction.

Existing Restrictions

If this spreadsheet is currently restricted, this controls how the new restriction is added to the current restriction.

OK

Restrict the spreadsheet as required, and close the dialog.

Apply

Restrict the spreadsheet as required and leave the dialog open to apply further restrictions.

Cancel

Close the dialog without making any further restrictions.

Remove All

Remove any current restrictions on the spreadsheet.

Example

Expression 1: Year == 1997
And selected
Expression 2: Month .in. !(4,5,6)

This will select rows belong to months 4,5,6 in 1997.

See Also

Spreadsheet Restrict/Filter Menu for other methods of defining restrictions.
Restrict using Factor Levels
Restrict Units by Value
Save Restriction/Filter
Restrict/Filter Duplicate Rows
Spreadsheet Restrict/Filter Menu

The RESTRICT directive can be used to filter columns within the command language.