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;
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.