2 Replies Latest reply on Jul 25, 2016 9:21 AM by sam.hong.0

    How to use IF statements with Number of Records?

    sam.hong.0

      Hello,

       

      Is it possible to do a IF statement on number of records to display certain things?

       

      For example, if I have the following:

       

         

      GroupNumber of RecordsIntended
      17Good
      250OK
      3100Too High
      445OK
      520Good

       

      Basically, I want to create a formula that would create the third column. For example, IF (NUMBER OF RECORDS) is LESS THAN 10 THEN "GOOD".

       

      Here is an example of the real data I am trying to do using the concepts of the above.

       

      When I try the following in Tableau, it gives me all null values.

       

      IF [Number of Records] <= 10 THEN "GOOD"

      ELSEIF [Number of Records] >= 50 THEN "TOO HIGH"

      ELSE "TBD"

      END

       

      Even though the number of records falls into the above formula, it always displays TBD.