Hello,
I have the following data and I want to use the Lag function to calculate the difference between each result and the result prior to it (the data table is also attached to this message).
I am using JMP 16.
![jgross_2-1736542505146.png jgross_2-1736542505146.png](/t5/image/serverpage/image-id/71841i5F4F56B3D78F55ED/image-size/medium?v=v2&px=400)
Currently I'm using the following formula in the "Difference" column:
![jgross_0-1736542408545.png jgross_0-1736542408545.png](/t5/image/serverpage/image-id/71839i66022B4EC7E17064/image-size/medium?v=v2&px=400)
What I can't figure out is how to get the calculation to "reset" once it gets to Batch B. I realize that even with my current formula, only the difference value in row 16 is incorrect, but still I would know to setup the formula so that it works properly within batches.
Does anyone have any suggestions?
Jeff