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
what is ae onset date n what is RDS
Given an unsorted data set, how to read the last observation to a new data set?
What is maximum storage capability of SAS?
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
what is star schema? : Sas-di
what are sas/access and sas/connect? : Sas programming
what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake
What is the general format of function in sas? : sas-grid-administration
Why double trailing @@ is used in input statement?
Differences between where and if statement?
what is sas business intelligence? : Sas-bi
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
What is interleaving in SAS?
What are the different types of sas functions?
what is data access? : Sas-di