The way I was able to implement this in the script was by using the peek function. When reloading the script the peek function will look at the previous field's value in the data.
Since I don't have the original excel spreadsheet I created an inline table similar to the data set above.
LOAD * INLINE [
Order, New, Mach
1, 297622, 324082
2, 278174, 320720
3, 405872, 311627
4, 288244, 313817
New - Mach as Calc
Drop table test;
IF (rowno() = 1, Calc, IF (rowno() >= 2, peek([New vs Mach]) + Calc)) as [New vs Mach]
Drop table test2;
So the basic idea is create a field called Calc that does the basic New-Mach equation.
Then create the New vs Mach field, for the first row just use the Calc field like you mentioned earlier, but if its the second row or above you need to use peek([New vs Mach]) + Calc.
This produces the same results as what you got in excel (for me at least).
Hope this helps...