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
Answer Posted / 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 |
Post New Answer View All Answers
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
How you can read the variables that you need?
Explain the difference between informat and format with an example.
How to include or exclude specific variables in a data set?
how does sas handle missing values in formats? : Sas programming
what is factor analysis? : Sas-administrator
Mention what is SAS data set?
what is sas database server? : Sas-di
what are the considerations when picking a SAS/STAT procedure?
Which command is used to perform sorting in sas program?
In proc transpose and data step with arrays which one you pick?
What is the difference between match merge and one to one merge?
what is slowly changing dimension? : Sas-di
If a variable contains letters or special characters, can it be numeric data type?
Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?