Selection: How do I limit a Selection?
You can limit the records selected in a number of ways.
You may want to restrict a selection or part of a selection to a certain number of records. This is called applying a limit to a selection. In addition to this, FastStats lets you apply Top N limits on a selection or part of a selection so that you can define a rule to determine which records are selected. See Selections: How do I make a Top N Selection? for more information on Top N selections.
Limits can be applied in the following three ways:
-
First will take the first N records.
-
Regular Stratified will take a sample using a regimented Nth.
- Random creates the sample using a random decision for each record.
To apply a limit on a selection:
-
Right click on the node in the selection tree which you want to apply the limit to
-
Choose Apply limits... from the pop-up menu as shown below.
-
Choose the method for limiting the selection. The default setting will be All i.e. no restriction.
-
The Skip First text box is used to optionally skip the first N records.
-
The Fraction option lets you sample according to the fraction M / N.
-
The Percentage option lets you sample a percentage of records.
-
The Fixed Total option allows you to specify when to stop outputting records.
- Click OK to apply the limits.
Notice that the node in the selection which now has a limit applied changes to display LMT as shown below. In this example, it is applied to the whole selection.
In the following example, a limit of the first 1000 records on the 'Source of Telephone Enquiry' node has been applied. This selection will choose all records which have an Occupation of 'Director' plus the first 1000 records which have a Source of 'Telephone Enquiry'.
To modify a selection which has a limit on it, right click on the part which has the limit applied and choose Modify Limits... from the pop-up menu. To remove the limit, choose All on the resulting dialog box.
Related topics: