Skip to main content
Nintex Community Menu Bar

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

  • September 26, 2019
  • 2 replies
  • 20 views

Forum|alt.badge.img+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

Forum|alt.badge.img+12
  • Scholar
  • September 26, 2019

@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.


Forum|alt.badge.img+7
  • Author
  • September 27, 2019

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