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 you code to create a macro? : sas-macro
Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro
why is sas data integration studio important? : Sas-di
What is the maximum length of the macro variable?
what r the job openings SAS for fresher graduates !
How do you add a number to a macro variable? : sas-macro
Do you need to know if there are any missing values?
what is the difference between unique key and primary key? : Sas-di
What is SAS informats?
what is hierarchy flattening? : Sas-di
What are the five ways to do a table lookup in sas? : sas-grid-administration
How can I remove header from output data set?
How can sas program be validated?
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
how could you generate test data with no input data? : Sas programming