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

    Calculation Help

    ZoocMan85

      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
          ZoocMan85

           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
            philmodjunk

            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
              LaRetta_1

              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
                ZoocMan85

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