With Ledger 90, you can use {2} as a code prefix to turn any field into the same field but for two years ago. So {2}Y would be Year to Date two years ago. Or {2}M would be the current month two years ago.

You can go up to 9 years ago with the prefix - {9}Y would be year to date 9 years ago.

You can also use a negative number for a future year - {-1}B would be the Full Year Budget for next year.

All of this is outlined in the GL!SuperSpec90 sample statement that Andrew mentioned above.
_________________________
Regards,
Softrak Tech Support