10-07-2013 04:33 PM
Hello, I intended to use the below code so that 'count' would be a value showing similar results to 'frequency' in a proc freq table. If you can look through it and see any glaring errors please let me know. The results I'm getting is just a count of the entire population like _n_, it's not resetting the counter by every pcpid.
merge all_n (in=a rename=(pcp_id=pcpid))
if first.pcpid then do count=1;
if last.pcpid then output;
Need further help from the community? Please ask a new question.