DATA ABC;
INPUT TDATE DATE9. AVG;
CARDS;
18APR2008 150.00
19APR2008 167.00
20APR2008 123.00
21APR2008 145.00
;
RUN
HOW CAN I FIND THE DIFFERENCE BETWEEN AVG OF 18APR2008 ANF
21APR2008??
IF ANY ONE GETS IT PLS TRY TO POST IT.
Answer Posted / rohitbedi
Shortest answer: Copy the dataset and create a new field using difn function on avg where n=3 as shown below.
data abc2;
set abc;
diff = dif3(avg);
run;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
where to use sas business intelligence? : Sas-bi
Which statement does not perform automatic conversions in comparisons?
What is the SAS data set?
What are the prime responsibilities of data integration administrator? : Sas-di
What is the general format of function in sas? : sas-grid-administration
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.
Of all your work, where have you been the most successful?
name several ways to achieve efficiency in your program? : Sas programming
What is slibref?
why is sas considered self-documenting? : Sas programming
Name some categories in sas 9? : sas-grid-administration
Give e an example of..
What do you know about symput and symget?
How do you test for missing values?