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
Are you involved in writing the inferential analysis plan? Tables specifications?
how can you put a "trace" in your program? : Sas programming
How to create an external dataset with sas code?
what are the scrubbing procedures in sas? : Sas programming
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
Intern stastical programmer written test
What are the differences between proc means and proc summary?
Describe the function and untility of the most difficult SAS macro that you have written.
Mention what are the data types does SAS contain?
What is proc sort?
what are input dataset and output dataset options? : Sas programming
If a variable contains only numbers, can it be a character data type?
Name types of category in which SAS Informats are placed?
what are the best practices to process the large data sets in sas programming? : Sas-administrator
How does the internal authentication work in sas? : sas-grid-administration