Troubleshooting
Problem
How can I assign a series of consecutive ID numbers to my cases?
Resolving The Problem
The $casenum variable is a system variable in SPSS that numbers the cases in your data set. You may use the following command:
COMPUTE id=$casenum.
EXECUTE.
This creates a variable called ID that numbers the cases consecutively from 1 to N, N being the number of cases in your active data set.
Related Information
[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"19.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Historical Number
21687
Was this topic helpful?
Document Information
Modified date:
16 April 2020
UID
swg21476977