Intermediate values in formulas (let expressions)

Can there be any way to declare+use an intermediate value in an expression without creating a full variable?
To enable all sorts of things, e.g.

t1 := fn(var)
if t1 > 400 then t1 else -t1

Equivalent to a let expression in functional languages, or the var statement in dax, etc. Just another stepping stone on the road to hell/vastly overcomplex business rules living in spreadsheets…

keywords: let, intermediate, temp value, temporary value

1 Like

Hey Jarrad, I’m afraid that’s not possible. Creating a new variable is the only way to accomplish your use case; however, here are some tips to keep your model organised:

  1. If you add a linked model, you can move the intermediate variables to this new model by selecting an option under Move Variable(s) to Model in the context menu.

  2. A group can be used to contain all of the variables used for a particular calculation.

1 Like