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;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: