0 Replies Latest reply on Apr 1, 2010 4:12 AM by Bernard

    Count the occurrence of a strings/ words in a text where the strings/ words are part of a list

    Bernard

      Title

      Count the occurrence of a strings/ words in a text where the strings/ words are part of a list

      Post

      Hi there,

       

      I'd like to do the following: Count the number of occurrences of strings/ words from a list I created in a text:

       

      - I have a table which contains feedbacks from customers (1st column the number of the feedback, second column the list of all feedbacks)

      - I have another table which contains a list of words in one column I'd like to search for (eg "great", "price", "fantastic", "problem" etc)

       

      I'm trying to add a calculation column in the first table which will tell me the count of occurrence of any of the strings/ words of my list from the second table.  For instance:

       

      Feedback #1: "The service was great" should return 1 (as "great" is included in the feedback)

      Feedback #2: "The service was not great, but the price was ok" should return 2 (as "great" and "price" are included in the feedback)

      Feedback #3: "The service was good" should return 0 (as none of the words I'm looking for in my list are included in the feedback)

       

      I tried the PatternCount function but the calculation field only check the occurrence of the first word of my list.

       

      Thanks in advance - Bernard