Cloud Wanderer

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

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
Automation Master

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

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

Cloud Wanderer