Honestmath
Technical User
hey there,
can anyone tell me if there is a way to create not just a running total (which i saw on MSKB), but also a running difference... e.g. my data looks like this
Bdate Prc1 HoldChg
1-Jan-90 33 100
3-Jan-90 40 -50
5-Jan-90 38 -25
7-Jan-90 34 80
8-Jan-90 33 -105
and i need to calculate a couple fields based on the (ordered) difference between the current and previous value.
RT1 RD1 RT2
RunTot Rundiff runtot
Bdate Prc1 HoldChg of Holdchg prc1* <----that col
holdchg(-1)
1-Jan-90 33 100 100 0 0
3-Jan-90 40 -50 50 700 700
5-Jan-90 38 -25 25 -100 600
7-Jan-90 34 80 105 -100 500
8-Jan-90 33 -105 0 -105 395
to clarify, RD1 = (prc1(i)-prc1(i-1))*holdchg(i-1)
is this possible??
thanx so much for the help
math
can anyone tell me if there is a way to create not just a running total (which i saw on MSKB), but also a running difference... e.g. my data looks like this
Bdate Prc1 HoldChg
1-Jan-90 33 100
3-Jan-90 40 -50
5-Jan-90 38 -25
7-Jan-90 34 80
8-Jan-90 33 -105
and i need to calculate a couple fields based on the (ordered) difference between the current and previous value.
RT1 RD1 RT2
RunTot Rundiff runtot
Bdate Prc1 HoldChg of Holdchg prc1* <----that col
holdchg(-1)
1-Jan-90 33 100 100 0 0
3-Jan-90 40 -50 50 700 700
5-Jan-90 38 -25 25 -100 600
7-Jan-90 34 80 105 -100 500
8-Jan-90 33 -105 0 -105 395
to clarify, RD1 = (prc1(i)-prc1(i-1))*holdchg(i-1)
is this possible??
thanx so much for the help
math