5 Replies Latest reply: May 15, 2014 10:08 AM by Data Kruncher RSS

    Compound Filter w/Number Range

    Leanna _

      The following filter is supposed to exclude certain lenders and include only a bond range of 300 to 381 of lender 834511.  It is also pulling in 600 range of bond numbers for lender 834511 in error. 

       

      lender<>"825659".AND.lender<>"833059".AND.lender<>"833224"

      .AND.lender<>"999155" .And. LENDER<>"834467" .OR. (LENDER="834511".And.Bond >299 .and. Bond <382)

       

       

      Any suggestions?

        • Compound Filter w/Number Range
          Data Kruncher

          Hi Leanna,

           

          I think that you're close, but need to adjust the formula slightly to enforce your order of operations by adding some additional parentheses.

           

          Try this:

          (lender<>"825659" .AND.

          lender<> "833059" .AND.

          lender<> "833224" .AND.

          lender<> "999155" .And.

          LENDER<> "834467") .OR.

          (LENDER="834511" .And.

          (Bond >299 .and. Bond <382))

          /code

           

          Alternatively, this might be easier to maintain if you have future changes/exclusions:

          Lender .NotIn. ("825659","833059","833224","999155","834467") .Or.

          (LENDER="834511" .And. (Bond >299 .and. Bond <382))

          /CODE

           

          Any better?

            • Compound Filter w/Number Range
              Leanna _

              Hi Leanna,

               

              I think that you're close, but need to adjust the formula slightly to enforce your order of operations by adding some additional parentheses.

               

              Try this:

              (lender<>"825659" .AND.

              lender<> "833059" .AND.

              lender<> "833224" .AND.

              lender<> "999155" .And.

              LENDER<> "834467") .OR.

              (LENDER="834511" .And.

              (Bond >299 .and. Bond <382))

              /code

               

              Alternatively, this might be easier to maintain if you have future changes/exclusions:

              Lender .NotIn. ("825659","833059","833224","999155","834467") .Or.

              (LENDER="834511" .And. (Bond >299 .and. Bond <382))

              /CODE

               

              Any better?[/QUOTE]

               

              Unfortunately, it still doesn't work.  I even copied and pasted to make sure I entered it right.