Create 'Offset' capability for custom formulas

Can you please create the ability to offset any Custom Formula, so that there is a way to compare the results to a prior period.

Or more generally: allow passing of parameters to Custom Formulas