Hi All,
I habe two input datasets , dataset one and two and I want dataset three which will have aggregated value of first two daraset.
dataset one
one
id s1 s2 s3 s4
101 20 30 40 seema
121 30 20 10 rekha
dataset two
id s1 s2 s3 s4
101 25 35 45 seema
I want output table dataset three as
id s1 s2 s3 s4
101 45 56 85 seema
121 30 20 10 rekha
data all / view=all;
set one two;
run;
proc means data=all nway;
class id s4;
var s1-s3;
output out=want (drop=_TYPE_ _FREQ_) sum()=
run;
data all / view=all;
set one two;
run;
proc means data=all nway;
class id s4;
var s1-s3;
output out=want (drop=_TYPE_ _FREQ_) sum()=
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.