Skip to main content
Adaptive Planning
Last Updated: 2023-06-23
Create Dynamic Time References in Formulas

Create Dynamic Time References in Formulas

Question

I need to write a formula that functions like this:
ACCT.IT_Expense[time=01/2017]
except instead of 2017, I 'd like to reference January of which ever year being reported on. How can I write the time modifier to function this way?

Answer

With current functionality, there is not a syntax to dynamically reference the first month of the current year. For example, you cannot write a formula that says,
ACCT.IT_Expense[time=1/this.year]
. However, you can get similar results using an if statement. Your formula would look something like:
iff(year(this)=2016,ACCT.IT_Expense[time=01/2016],iff(year(this)=2017,ACCT.IT_Expense[time=01/2017],iff(year(this)=2018,ACCT.IT_Expense[time=01/2018]...