2 Replies Latest reply on Mar 15, 2012 7:34 AM by grantreeves

    Calculated Field - using "OR" operator

      I am attempting to use an "OR" Operator to return to me a Count of Customers Calculated Field.  Below is the formula that I am using. 

       

      Tableau doesn't seem to like the "OR" operators shown below.  What can I use to get the results I'm looking for?

       

      Here is what I need:

       

      Business Segment can be either ABC or XYZ

      The date has to be a null date

      YNNOBILL and YNVOID = 0

      HoldReasonCd can be either D, E,F or G.

       

      Any help!?

       

      Thanks all.

       

      IF(ISNULL ([Date])=TRUE) AND ([BusSegment]="ABC")

      AND ([DocType])="MtrRd"

      AND ([YNNoBill]="0")

      AND ([YNVoid]="0")

      AND ([HoldReasonCd]="D") OR ([HoldReasonCd]="E") OR ([HoldReasonCd]="F") OR ([HoldReasonCd]="G")

      THEN [CustID (copy)]

      ELSEIF(ISNULL ([Date])=TRUE) AND ([BusSegment]="XYX")

      AND ([DocType])="MtrRd"

      AND ([YNNoBill]="0")

      AND ([YNVoid]="0")

      AND ([HoldReasonCd]="D") OR ([HoldReasonCd]="E") OR ([HoldReasonCd]="F") OR ([HoldReasonCd]="G")

      THEN [CustID (copy)] END