Use timeOffset to perform calculations using current or previously-generated values. You can also use this function to update a formula with values generated in the future.
You can insert previously-generated values in two ways:
To use timeOffset:
Select Functions, thenTime, and double-click timeOffset.
This inserts: timeOffset(subformula, - #d,w,y,m,p) or dd/mm/yy
Replace subformula with the function that inserts the object whose value to use.
For example, timeOffset(mScore(“InternalCosts”)) retrieves the score of the InternalCosts measure.
To insert the current or a previously-generated value: Replace # with the number of intervals, such as months, that have elapsed since the value was generated.
To insert a value that has not yet been generated once it is generated: Replace - with a plus sign (+). Replace # with the number of intervals, such as weeks, after which the value will be generated with a plus sign (+).
Specify a time interval using TimeOffset depending on if you know the date on which the value was, or will be, generated as follows:
If you do not know the date on which the value was, or will be, generated use timeOffset(subformula, # - (interval), with one of these variables:
d—Insert a value that was generated x days ago, or that will be generated in x days
w—Insert a value generated x weeks ago, or that will be generated in x weeks
y—Insert a value generated x years ago, or that will be generated in x years
m—Insert a value generated x months ago, or that will be generated in x months
q—Insert a value generated x quarters ago, or that will be generated in x quarters
p—Insert a value generated x periods ago, or that will be generated in x periods
For example, to insert a measure result that was collected six weeks ago, enter:
timeOffset(mResult(“measure”), -6 w
Use if you know the date on which the value was, or will be, generated, use timeOffset(subformula, # dd/MM/yy)
Replacedd/mm/yy with the day, month, and last two digits of year on which the measure was or will be generated. For example, to insert the score that a scorecard generates on a December 1, 2007, enter timeOffset(sScore(“scorecard”),01/12/07