Improvement request: exponent in calculations

Right now (the guide indicates), we can put calculations in fields using the operators +, -, /, and *, plus parentheses. I would love it if we could add ^ to this list to perform exponentiation.

Rationale: This would allow me to easily create an entry that involves compound interest, e.g. P * (1 + r/n)^(n * t) - P, which is a thing that I have reason to do with regularity.

Now that would raise the program to powerful status! :grinning_face_with_smiling_eyes:

1 Like

Hey, guess what? I just tried this in a field and…it worked?

Can we assume that this feature is intentional and is here to stay? If so, I change my request to “Please update the documentation to indicate that this works :-D”

Yes, this has always worked. I was confused that you are requesting something that’s already in the program.

1 Like

@lubos I simply hadn’t tried it - I read the docs first and believed them.

I guess my follow up question is “Is there any way to use the current balance of the account as a variable in the calculation as I enter it?” My assumption is “No” but I figured it’s worth asking.

@lubos, as I tested this, I discovered that braces are no longer recognized as they formerly were. The current Guide, for example, shows as an acceptable example:

Screen Shot 2021-06-01 at 9.06.29 PM

But, if you enter the same expression now, the program rejects it and flags it in red:

Screen Shot 2021-06-01 at 9.09.16 PM

But nested parentheses are accepted:

Screen Shot 2021-06-01 at 9.10.46 PM

Is this intentional or a bug?

I don’t think braces were ever supported. Probably the previous versions were ignoring them while current version does not. Nested parentheses was always the way to go.

I guess that makes sense, since in the example in the Guide, the braces are actually extraneous. Thanks.

yep
It’s a powerful feature I use regularly.

The method I have found most efficient is

  • Write the calculation in the description. If several parts are involve show the calculation for the overall formula
  • Copy and paste the formula (or parts of it) to a calculating field in Manager
  • Next time clone the prior transaction, edit the formula values then repeat the copy & paste

For example Private vehicle use - worked example

2 Likes

This is especially helpful when you remember the calculation formula is not stored when the transaction is created or updated. Only the result is stored, as though it had been entered as a number directly. Without some fixed annotation, you will never know what formula you entered.