1 of 1 people found this helpful
That's challenging indeed.
I've done something similar before where I scour text strings for certain keywords or phrases and then try to make counts for "categories."
I think you generally have two paths you could follow:
Option #1 (much easier by far) create a "counter" measure field to aggregate each "category" individually. Essentially, it's a bit value/true-false field with 1 when the "string match condition" is met somewhere in the text string, and 0 when it is not.
Option #2 would be to try to create a SINGLE field that categorizes every line. Here, I generally would create some sort of "hierarchy" of answers. If you find a more important category within a response, then you would let that take precedence over a "lower" category.
Let's use your example of 'important topic' and 'bad speaker.'
For #option 1, you'd essentially bring in a count for each category. You would then have access to all the measures collectively by using the special Measure Values shelf.
The formula for the "Topic Important" category counter would be something like:
IF CONTAINS([ResponseField],'topic is important')
OR CONTAINS([ResponseField],'this is an important topic')
THEN 1 ELSE 0 END
Then your "Speaker Bad" category count would be:
IF CONTAINS([ResponseField],'speaker sucks')
OR CONTAINS([ResponseField],'speaker was so lame')
OR CONTAINS([ResponseField],'speaker was awful')
THEN 1 ELSE 0 END
For Option #2, let's say for whatever reason "Speaker Bad" is more important than "Topic Important." But having both would trump either by itself.
So, it'd be something like:
IF ([Speaker Bad]=1 AND [Topic Important]=1) THEN 'Speaker Bad and Topic Important'
ELSEIF [Speaker Bad]=1 THEN 'Speaker Bad'
ELSEIF [Topic Important]=1 THEN 'Topic Important'
ELSE 'Unknown' END
As you can see, it quickly gets hairier as you introduce a third or more option... I'd tend to recommend trying to tackle this using Option #1 and creating an "event" trapper that will give you each result.
Sorry so long as disorganized. Hope this helps. Good luck!
Yeah - that makes sense, I see where you're going with both of them (and, yes, #2 would become a monster pretty quickly). I think I need to re-think my whole approach & may have to post another question or two, but your input helps - thank you,