Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
mmainiero
New Contributor II

Count Phrase in List

Hi, I would like to count the appearance of a word in a List of Sentences.


List:


Number     Phrase

1                Hello World

2                Qapla

3                the force awakens

4                the force may be with you

5                The Storm


Now I want to count for example “force” or “the”.


Force should be (2) and the (3)

I have tried

=SubStringCount(PHRASE,'force')

=count({<PHRASE={'force'}>}Number)

1 Solution

Accepted Solutions
ahaahaaha
Honored Contributor

Re: Count Phrase in List

Hi Markus

=substringcount(Concat(Phrase), 'force')

If words can begin with a capital letter, use, for example, function lower()

=substringcount(Lower(Concat(Phrase)), 'the')

Regards,

Andrey

2 Replies
MVP
MVP

Re: Count Phrase in List

Try with wildcard search, like:

=count({<Phrase={'*force*'}>}Number)

ahaahaaha
Honored Contributor

Re: Count Phrase in List

Hi Markus

=substringcount(Concat(Phrase), 'force')

If words can begin with a capital letter, use, for example, function lower()

=substringcount(Lower(Concat(Phrase)), 'the')

Regards,

Andrey

Community Browser