4 Replies Latest reply on Jan 24, 2013 5:26 AM by christian.vonhehn

    Using 'CONTAINS' function to filter for certain key words


      I'm new to Tableau, and this question may have been asked before, but searching the Forum didn't bring up any meaningful answers.

      I would like to count how often a certain field contains certain key words.

      For example, in a field called called [Inquiry] I want to see how many records are related to 'pregnancy'

      My Calculated Field returns no errors, but is wrong (just looking at the underlying data, and doing the same filter in excel returns differernt numbers).


      IF CONTAINS([Inquiry], "pregnan") = true THEN 1 ELSE 0 END


      I'm using "pregnan" so I can search for 'pregnancy' and 'pregnant'.


      Thanks a lot for any help!