BookmarkSubscribeRSS Feed
ssas
Calcite | Level 5
Hi,
I have a table A with 10 variables and 3200 observations, i run the proc summary nway to find the frequency of records with consideration of 5 variables ( in my class statement) and i am using the missing option in my summary nway.
In my output i am getting only 2825 observations.
1). i would like to know how to find the missing observations in table B from Table A ( i.e observations that are in table A not in table B).
2). Why some of the observations are missing

I will be thankful if anyone could help me.

Thanks in advance,
sams
1 REPLY 1
stateworker
Fluorite | Level 6
Here is what I do when I want to see what is in one table that is not in the other. Hope it makes sense and/or helps.

proc sort data=TableA; by keyvariable; run;
proc sort data=TableB; by keyvariable; run;

data Aonly Bonly Both;
merge TableA (in=A)
TableB (in=B);
by keyvariable;
if A and B then output Both; else
if A and not B then output Aonly; else
if B and not A then output Bonly;
run;

proc print data=Aonly; run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 988 views
  • 0 likes
  • 2 in conversation