Final data should be with money4 column with minimum value in data step or pro sql programming or macro
data b ;
input USUBJID MONEY1 MONEY2 MONEY3 ;
cards ;
10001 120 110 300
20001 120 10 300
30002 120 900 90
;
run;
I want output in new column Money4
where i will get min value of (money1 money2 money3)
i.e
Money4
110
10
90
Thank you
data b ;
input USUBJID MONEY1 MONEY2 MONEY3 ;
cards ;
10001 120 110 300
20001 120 10 300
30002 120 900 90
;
run;
data want;
set b;
money4=min(of money1-money3);
run;
@pdhokriya wrote:
Ok Thank you.
What about proc sql syntax?
You also use the MIN function in the SELECT.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.