I have to following synthetic data similar to my data. I have millions of records so this is demo I created. data test; input Name $ sex $ weight height income; cards; Bob M 1 0 0 Mat M 0 1 0 Cat F 1 0 1 Dog F 1 0 0 Fred M 0 1 1 Sam M 0 0 1 Pat F 0 0 0 Jack M 1 1 1 ; run; My goal is to identify when a row has more than 1 record within the variable weight, height and income. For example the cat, fred and jack rows all have 1 record for each variable, how will I find these values. I want to identify row with more than 1 record separately from row with only 1 record. So I want the count of cat, fred and jack separately and the count of bob, mat, dog, sam separately. I already identify the latter using this code; data check; set test; if weight =1 or height =1 or income=1 then total_all=1; else total_all=0; run;
... View more