Hi all,
I'm trying create a new variable that counts the number of responses across 5 variables within the same row.
example dataset:
Col1 Col2 Col3 Col4 Col5 Count
Dew Coke . 7up Juice 4
Lays Pepsi Aero Crush Sprite 5
The SAS code I've tried so far is but this code just gives a missing value in the count column:
data brand;
count=sum(of col1--col5);
run;
Thanks in advance for any help!