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


Please Help Members By Posting Answers For Below Questions

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?

1929


where to use sas business intelligence? : Sas-bi

566


Which statement does not perform automatic conversions in comparisons?

1187


What is the SAS data set?

663


What are the prime responsibilities of data integration administrator? : Sas-di

578






What is the general format of function in sas? : sas-grid-administration

552


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.

1683


Of all your work, where have you been the most successful?

4188


name several ways to achieve efficiency in your program? : Sas programming

560


What is slibref?

727


why is sas considered self-documenting? : Sas programming

667


Name some categories in sas 9? : sas-grid-administration

544


Give e an example of..

1827


What do you know about symput and symget?

711


How do you test for missing values?

1051