I feel like this is a pretty simple question but I can't seem to find a simple answer.
I have a dataset with a large number of variables. For each variable I'd like to know how many possible values it can take on. So if a variable is either '1,' '2,' or 'NA' then the result would be 3 for that variable. And so on for the entire list of variables.
Seems simple enough, but I can't figure out a good way to do it. Any advice out there?
I suggest you check out the FREQ procedure. While it is more commonly used to do counts of each distinct value of a variable, it can also output a dataset that contains the distinct values of a variable, one per row. So if you count up the number of rows then you will have your answer.