Your subject is pretty meaningless as Col3 shows no numeric values, so no "mean" can be calculated. Also how are we supposed to use the value Col2 to select anything from Col3? We need some sort of rules.
I suspect that you do not even have a SAS data set.
Show us actual values, describe how to use Col2 with Col3 and best would be to include a small worked example given the example values.
[image: image.png] I did the selection of values from second colum : aspfmt=.; if DR1IFDCD in (75100800 75202011 ) then aspfmt=1; else aspfmt=0; I dont know how to select values from DR1GRMS that match values from DR1FDCD and find mean of those values. Thanks
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.