09-24-2013 01:13 PM
I would like to add a variable that counts the number of variables each row has in a dataset, in excel I use =COUNT(B22) to get the desired result. Can someone help to do this in SAS? I have 4 variables, pcpid, date2011,date2012, date2013. I want to have a count from 0-3 regarding the dates. If something was returned from a pcp the date field will be populated. I will then sort by the count field to have the pcp that returned all three surveys at the top.
Need further help from the community? Please ask a new question.