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;
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.
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.