0

difference from the same field on two records

Hello. I am trying to create a field wich shows the difference between a number of another field of the same record and the one from the previous.

E.g. This month I have spent 100, last month 80. I want a field that shows 20 on the same record of 100.

2 replies

null
    • Birger_H
    • 4 yrs ago
    • Reported - view

    let me := this;
    'spend' - last((select 'TableName' where number(_id) < number(me._id)) order by number(_id)).'spend'

    Birger

    • info.19
    • 4 yrs ago
    • Reported - view

    Thank you. It worked perfectly, even if I have no idea how... It's so different from FMPro.

Content aside

  • 4 yrs agoLast active
  • 2Replies
  • 700Views