2 Replies Latest reply on Apr 18, 2018 9:14 AM by Stephen Groff

    COUNTD with IF Statement - Missing an operator?

    Stephen Groff

      I'm trying to navigate my first few IF statements in Tableau and I need to COUNTD my serial #s based on an IF statement.

       

      Could someone please point out to me where I've gone wrong?

       

      COUNTD([Ser No])

          IF [Fac Prod Fam Cd]='ACOM' OR [Fac Prod Fam Cd]='SCOM' OR [Fac Prod Fam Cd]='LAP' OR [Fac Prod Fam Cd]='RM' OR [Fac Prod Fam Cd]='SCRD')

              AND ([Disc Area Id]='400' OR [Disc Area Id]='450')

              AND [Prototype Ind]='N'

              AND [Ext Cpy Stat]<>'D'

              AND [Ser Pfx]<>'BOE'

              THEN 1

              ELSE NULL

          END

       

      Tableau highlights my error (in RED) as a syntax error (missing operator).

       

      Thanks.