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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.