Create a Calculated formula that compares 2 currency fields, to determine which is greater...

  • 26 September 2019
  • 2 replies
  • 5 views

Badge +7

I am trying to create a calculated formula that compares 2 currency fields, to determine which is the lesser value of the 2 then, use the lesser of the 2 values and divide that value by a 3rd field.

Look at "PurchasePrice" field and the "AppraisalValue" field and determine which is the lesser of the 2.  Using the lesser of the 2, divide the "CurrentBalance" field by the lesser value.

=CurrentBalance/whichever the lesser value is.

 

Can someone help me create that formula?


2 replies

Badge +12

@DinaF ....you can use the If statement, (assuming PurchasePrice, AppraisalValue and CurrentBalance are either form controls or Item Properties), see below:

 

If(lessThanOrEqual(PurchasePrice,AppraisalValue), CurrentBalance/PurchasePrice, CurrentBalance/AppraisalValue)

 

Above statement will:

  1. Checks the condition if PurchasePrice <= AppraisalValue (I was not sure how you wanted to handle when they are equal !!!)
  2. If it is than CurrentBalance/PurchasePrice 
  3. If it is NOT than CurrentBalance/AppraisalValue

Please mark this as a solution if it works for you.

Badge +7

Thank you!  This is perfect!!  I don't think they are ever equal but will check on that.  Thanks again!

Reply