4 Replies Latest reply on Jan 6, 2012 12:56 PM by ZoocMan85

# Calculation Help

### Title

Calculation Help

### Post

Hey Everyone,

Im trying to get this simple forumla working but it doesnt unfortunately.

If (Gross Unearned Income >10; 10;0 or Gross Unearned Income >20;20 20)

I know that is the wrong format but, looking at it..im sure you can understand what im doing. Please Help. Thanks!

• ###### 1. Re: Calculation Help

If (Gross Unearned Income >10; 10;0 or Gross Unearned Income >20;20;20)

Sorry this is the right version of the calc im trying to accomplish.

• ###### 2. Re: Calculation Help

I can't understand what you want.

You want 10 returned when the field's value is greater than 10?

You want 20 returned when the field's value is greater than 20?

I'm guessing you might want something like:

Case ( Gross Unearned Income >20 ; 20 ;
Gross Unearned Income >10 ; 10 ;
0 )

• ###### 3. Re: Calculation Help

Can you tell us the result you want in human words?  If(), Case() and many other functions stop evaluating when they hit the first true.  Also, If() can only handle one value plus a default result.  If you have more than two tests, use Case() instead.  So you want to first eliminate all those over a certain number, similar to:

Case (
Gross Unearned Income > 100 ; 100 ;
Gross Unearned Income > 50 ; 50 ;
Gross Unearned Income > 20 ; 20 ;
Gross Unearned Income > 10 ; 10 ;
0
)

... or reverse it and eliminate the smaller numbers first by using ≤ .

But if you are always rounding down in groups of 10 then you might try this:

Floor ( Gross Unearned Income / 10 ) * 10

• ###### 4. Re: Calculation Help

You hit the nail on the head phil thanks... let me try it.