Hi Just in case if you require only the number of combined rows for the variable Patient ID, below code can be handy. data pat1; set pat; if first.patient then count =1; else count+1; if last.patient; by patient; run; for Output, just click on the attachement. Thanks
... View more