Hi,
I need to identify the first occurrence of the value in Field D and then need to pull the value before the first occurrence from Field B and use it with other value from Field C.

from the above example,
1. I need to identify the first occurrence of value 1 in Field C
2. Pick the before value from Field B (i.e) 126
3. Need to subtract it with Field C (i.e) 192
4. Divide the value by Field A
e = (Field[c]-Field[B])/[Field A]
in this case, = 192-126/28 = 2.35
Please any idea o suggest how can i approach this?