I have a repetition filed consists of 24 rows and I would like to make subtraction between every two rows (2-1), (3-2) (4-3) . I'm using File Maker Pro 11. thanks a lot for any help

I have a repetition filed consists of 24 rows and I would like to make subtraction between every two rows (2-1), (3-2) (4-3) . I'm using File Maker Pro 11. thanks a lot for any help

Okay, so define a calculation field (result is Number ) =

Let (

i = 2 * Get (CalculationRepetitionNumber)

;

InputR[i] - InputR[i - 1]

)

where InputR is your existing repeating field with 24 repetitions, and let the calculation field have 12 repetitions.

--

P.S. I am sure there must be a better way to do whatever you're trying to do here, but you didn't tell us anything about that.

Thanks a lot Michael, but would you mind giving me example on my case:

first field that has values I've previously entered (Prev. Reading)

the second field that I want to get result of subtraction (Let's say Total Kilos)

Prev. Reading[2] = 66 and Prev. Reading[1] = 25 {where final result should be 1

Prev. Reading[3] = 70 and Prev. Reading[2] = 66 {where final result should be 4} ..... and so on

- 2 people found this helpful
I am sorry, I thought you wanted to subtract every pair (even - odd) To do what you describe, you will need a calculation field with 23 repetitions, using the following formula =

InputR[Get (CalculationRepetitionNumber) + 1] - InputR

--

I don't think the results you show are correct. If the InputR field contains:

25 ; 66 ; 70 ; 100 ; 200

then the result will be:

41; 4 ; 30 ; 100 ; -200

You may mark an answer as 'Correct' to close out the question. Or mark the entire thread as "Assumed answered", so that others know the question has been answered.

Thank you!

Beverly