To answer your question OP, the nlevels option will count distinct values, including missing values. The following code can help you break down multiple variables into unique values missing and non-missings much easier than performing the same task with a proc sql: ods output nlevels=LEVELS; proc freq data=dataset nlevels; tables var1 var2 var3 var4 / noprint ; run; proc print data=LEVELS; run;
... View more