Because it's random, you can't use GetNthRecord.
You can, however, set up a relationship that matches to the same month but the previous record. An ExecuteSQL query could also do this.
Let ( [ m = Month ( Date ) ;
d = Day ( Date ) ;
y = Year ( Date ) - 1
Date ( m ; d ; y )
could be used as a match field to a record with the same date but one year in the past. (I am noting that all dates shown show dates for the last day of the month.)
Yes, all of the dates would be the last day of month. Where and how would the match relationship be implemented?
Put the above calculation into a calculation field. Use it as a match field to your date field using a second occurrence (see Tutorial: What are Table Occurrences? ) of the same table in order to link records from the same table to each other in what we call a "self join".
Worked great, thanks for the tutorial, very well done.