### Title

How to calculate the field value difference from and the prior record.

### Post

Hi. using Filemaker pro 10.

I'd like to add to a report a field that is the difference in a field value from one record and the prior record.

Example:

File Difference

1

2 0

5 2

6 0

10 3

Difference is the field I need to create.

Is this possible as a field calculation?

Download this demo and compare: http://www.4shared.com/file/_acIPv7v/NthRecordDifference.html

Note: there's a typo in my last post. The calculation should read: Let ( N = Get ( RecordNumber ) ; If ( N > 1 ; Value - GetNthRecord ( Value ; N - 1 ) - 1 ; "" ) )