2 Replies Latest reply on Mar 18, 2013 7:36 AM by christian.vonhehn

    CONTAINS for multiple fields

    christian.vonhehn

      Dear Tableau community,

      I am trying to search two text fields for certain phrases and apply a value so I can count how many records contain these phrases. The formula that I am currently using works fine for one text field and one phrase.

       

      IF CONTAINS(LOWER([Field1]), "phrase1") THEN 1 ELSE 0 END

       

      But how do I connect string fields with an ‘OR’ syntax, like

       

      IF (CONTAINS([FIELD1] OR [FIELD2 ], “phrase1” OR “phrase2”) THEN 1 ELSE 0  (it seems I cannot use OR in this context)

       

      Any help is much appreciated. Thank you!

      Christian.