Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"moving Range"

Status
Not open for further replies.

sedgely

Technical User
Feb 21, 2002
406
GB
Hi all
Don't know if this is possible but here goes...

i have a view that returns data like:

DATE AREA No1 No2 FINAL
01/04/06 firstArea 20 28 .71
02/04/06 firstArea 15 22 .68
.
.
.
01/04/06 secondArea 14 20 .70
01/04/06 secondArea 27 32 .84
.
.
.

what i want to be able to do is create another view that returns the same as above BUT with an extra column with the difference between the previous days "FINAL" Figure and the given days FINAL figure e.g.

DATE AREA No1 No2 FINAL MOVING
01/04/06 firstArea 20 28 .71 -
02/04/06 firstArea 15 22 .68 .3
02/04/06 firstArea 14 20 .70 .02
01/04/06 secondArea 14 20 .70 0
01/04/06 secondArea 27 32 .84 .14
.
.
.


Cheers, Craig
Si fractum non sit, noli id reficere
 
do you have a unique key included in the first view? if so, you should be able to calculate the 'moving' column in a new view.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top