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