Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Word frequency dictionary

Hi,

I have this column called query text shown as below.

QueryText
OMG, Tomorrow is physics exam
OMG, Tomorrow is maths exam
OMG, Tomorrow is economics exam

What I would like to do is to extract each word from this column and do a frequency count of each word. So my output would be

WordCount
OMG3
Tomorrow3
is3
physics1
maths1
economics1
exam3

Could anyone tell me is it possible with Qlikview?

Regards,

Xue Bin

1 Solution

Accepted Solutions
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Try the attach file. Otherwise use this code.


LOAD *,Replace(SubField(QueryText,' '),',',' ') as Word;

    LOAD * INLINE [

        QueryText

        "OMG, Tomorrow is physics exam"

        "OMG, Tomorrow is maths exam"

        "OMG, Tomorrow is economics exam"

    ];

- In Straight table take dimension as Word and expression as Count(Word)

I hope it helps you.

Cheers!!!

View solution in original post

7 Replies
swuehl
MVP
MVP

Yes,

please check this tread:

http://community.qlik.com/message/13654

and there is also a similar app called word cloud or similar in the document section.

Regards,

Stefan

jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Try the attached file.

antose
Partner - Creator II
Partner - Creator II

Try SubField(Replace(QueryText,',', ''), ' ') AS Counter. Then add a listbox and show frequens

Counter.JPG

jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Try the attach file. Otherwise use this code.


LOAD *,Replace(SubField(QueryText,' '),',',' ') as Word;

    LOAD * INLINE [

        QueryText

        "OMG, Tomorrow is physics exam"

        "OMG, Tomorrow is maths exam"

        "OMG, Tomorrow is economics exam"

    ];

- In Straight table take dimension as Word and expression as Count(Word)

I hope it helps you.

Cheers!!!

Not applicable
Author

Hi Jagan,

     Thanks. And that's very nice of you posting the code here as I don't own a qlikview license:(  It works great:)

Regards,

Xue Bin

Not applicable
Author

Hi antose,

     Your solution works great too:) Thanks!

Regards,

Xue Bin

Not applicable
Author

Hi Stefan,

Thanks for pointing me to that post. Could you help me have a look at this problem? I have posted it here but so far nobody replied. In this case, can I assume Qlikview is not capable of doing that?

http://community.qlik.com/message/221441#221441

Regards,

Xue Bin