Sampling Variable

Select the Use sample variable option button on the K-Nearest Neighbors dialog box - Prototypes tab and click the Sample button to display the Sampling variable dialog box.

Sample Identifier Variable
Click the Sample Identifier Variable button to display a variable selection dialog box from which to choose the sample identifier variable.
Code for analysis sample
Select the code for the selected variable that uniquely identifies the cases to be used as prototypes (on which KNN predictions will be based). By default, when a sample identifier variable has been selected, a valid code will appear in the Code for analysis sample field. If this is not the desired code for identifying the prototype sample, double-click on the field (or press the F2 key on your keyboard) to display a Variable dialog from which you can select the desired code from the list of valid variable codes.
Status
Select the On option button or the Off option button to specify whether the sampling variable should be used.