I believe you could utilize the INDEX() function which creates a rank value within a partition. You can then do something to the effect of setting the rank by descending date so the most recent is always #1 and the 2nd most recent is always #2. You can access those figures in other calculations...
It gets a bit tricky to explain without an example, but maybe you'll be able to get help from this in-depth conversation re:Index Table Calculations .
If you can't figure it out, you're probably going to need to post a packaged workbook with your data, or recreate your situation with example data.