July 23, 20187 yr I’m using the technique described in Difference.fmp12 to find the difference between values on one record and on a previous record. The technique uses a self-join relationship and the Last function. I use the following formulas: Total = Amt1 +Amt2 Total2 = Last(Self_difference2::Total), where Self_difference2 is the self-join TO Change = formula If(IsEmpty(Total2),””,Total -Total2) The if statement suppresses the output on the first record since there is no previous record. The technique seems to be dependent on the sort order. However, in one file I find the records must be sorted ascending and in another file the records must be sorted descending. No sort order is specified in the self-join relationships. Can anyone explain this?
July 23, 20187 yr Author It was included in a message on this site. Sorry, but I don't remember which one. Something to do with getting the difference between two records. I'm including a copy with this response. Difference.fmp12
July 23, 20187 yr Hello, The calculation is base on the display so it depends of the order You can do it without any link, it would run with any sort Difference.fmp12
July 23, 20187 yr Author I'm not sure what you mean about "link". In one file the records must be sorted ascending by date, and in the other descending by date. Strange.
July 24, 20187 yr If you see at the file i posted you'll see that there is only one table in the graph. In your file there is two tables in the graph that's what i mean with link. In my solution, the sort isn't important, the calculation always work
Create an account or sign in to comment