Hi, I am merging two data sets and I am creating two Vars based on the first. last. by groups. Everything is merging fine, the newly created Vars and totaling fine, but my output is only displaying the totals or rather the final observation from each by group. I would like all the observations within each by group displayed in addition to the total and I know there is a way to do this but I can not find it in my notes or online anywhere. My code is pretty basic: Data set; merge one two; by animal name age; if first.age then do; totpounds=0; end; totpounds+pounds; if last.age output; run; These are dummy Vars but basically that's the idea. Any help would truly be appreciated. Thank you!
... View more