Hi, I have one dataset, could you please ans for this.
id amount paid_amount
1 700 400
2 900 250
3 300 300
a 400 250
b 500 320
c 800 650
x 200 190
y 900 250
z 300 180
i want create new dataset having id and paid_amount who are
paid high amount comparing amount.
ex: 1d paid_amount
3 300
c 650
x 190
Answers were Sorted based on User's Feedback
Answer / naresh
data high_amount;
set amount;
if amount>paid_amount then output;
drop paid_amount;
run;
proc print;run;
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / ashish
data test1;
set test;
pct=(paid_amount/amount)*100;
run;
proc sort data=test1 out=test2;
by DESCENDING pct;
data test3;
set test2(obs=3);
run;
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pavan
data inter7;
input id $1-2 sal1 6-9 sal2 13-16;
cards;
1 700 400
2 900 250
3 300 300
a 400 250
b 500 320
c 800 650
x 200 190
y 900 250
z 300 180
;
run;
data inter8 ;
set inter7;
if sal1>=sal2 then sal=sal1;
if sal2>=sal1 then sal=sal2;
run;
| Is This Answer Correct ? | 1 Yes | 4 No |
SAS using companies in chennai
how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di
In sas admin differentiate between roles and capabilities? : sas-grid-administration
how do i get last 10obs from a dataset when we don't know about the number of obsevations in that dataset?
What is the difference between a PROC step and a DATA step?
What are the difference between sas functions and procedures?
What is SAS? is it a software just for use or we can creat something over there?
what do the pad and dim functions do? : Sas programming
What is the role of sas grid administrator? : sas-grid-administration
What do you feel about hardcoding?
How to include or exclude specific variables in a data set?