I am trying to calculate the interest rate for a legal form I am creating at work. In order to get that rate you need to take the current balance X legal rate of interest X 0.01 / 365. Here is what I have currently written that is not calculating correctly.
{={Principal}-{Paid}*{InterestRate}*0.01/365}
When I run the mergefield "as is", on our test account that has a principle balance of 5,000 a paid balance of 0.00 and an interest rate of 10%(10.00) it comes out = 5,000 instead of 1.36.
I have searched forums and the Microsoft's support site and stackoverflow and only found info on what operators are allowed and examples of basic syntax of addition, subtraction, and division. None that where showing a combination of these. Can you please be another set of eyes and help me see where my syntax is incorrect?
This has to deal with order of operations. In this example, {Paid}*{InterestRate}*0.01/365} is executed first (multiplication/division), then the subtraction takes place.
Just add parens around {Principal}-{Paid} and it should work.
{ = ( { Principal } - { Paid } ) * { InterestRate } * 0.01 / 365 }