DateUnit value in exponent ?! => is this really an issue?

Hi guys,

I just came across this warning: “This expression has a DateUnit value as an exponent. Are you sure you want to do this?”
Bildschirmfoto 2021-11-08 um 22.51.33

What I’m trying to accomplish here:

  • I know the value of a variable X for a certain period (e.g. 1.000 in on Jan 2020)
  • I also know the annual growth rate of that variable (e.g. 5% p.a.)
  • I’m now trying to project - for each month in my model - the current value for my variable X given the known starting point and growth rate.

So my formula looks like this:

1000 * ((1+5%)^(1/12)) ^ (timeStep - date(2020,1,1))


(1+5%)^(1/12) converts my annual growth rate into a monthly growth rate
and (timeStep - date(2020,1,1)) simply gets the number of periods that elapsed since the 1st of Jan 2020.

Is there a better way to do this that doesn’t trigger any warnings in the system?

Thanks & Regards

Hey Fabian! Agreed. x ^ (t - date) shouldn’t throw an error, given “t - date” produces an actual number. The error/warning should only arise when it is solely date used as an exponent. I’ve passed this onto our engineering team. For now you can just dismiss the warnings :slightly_smiling_face:

1 Like