Case Selection Conditions - Examples

Following are some examples of case selection conditions:

Case Selection Condition

Result

v0 <= 50

When entered in the Include cases section of the Spreadsheet Case Selections dialog box - Selections tab, this selection condition will include only cases 1 through 50 in the analysis.

v1 = 1

When entered in the Include cases section of the Spreadsheet Case Selections dialog box - Selections tab, this selection condition will include in the analysis only cases where the value of variable 1 is equal to 1.

v1 = 'MALE'

When entered in the Include cases section of the Spreadsheet Case Selections dialog box - Selections tab, this selection condition will include in the analysis only cases where the value of variable 1 is equal to 'Male.' Note that you can use the text labels of a variable in case selection conditions, and that whenever you use text labels, you must enclose them in single quotation marks.

(v1 <= 10) OR (v2 = v3)

When entered in the Exclude cases section of the Spreadsheet Case Selections dialog box - Selections tab, this selection condition will exclude from the analysis those cases where the value of variable 1 is less than or equal to 10, or those cases where the values of variable 2 equal the values of variable 3.

V1>GetTime("3/25/04 10:00 AM")

Often, it is useful to select cases based on a timestamp in a Statistica spreadsheet. For example, in Quality Control analyses, it is common to want to review all samples that were measured after a certain time. When the variable is set to use the Date or Time Display format, and assuming the variable containing the timestamp is variable 1, the selection condition shown at left will include from the analysis those cases that were measured after 3/25/2004 at 10:00 AM.

See also: Case Selection Conditions - Overview, Case Selection Conditions Syntax Summary.