Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

uzername
New Contributor III

Qliksense Wordcloud using a text field

Trying to create a word cloud using d3-wordcloud extension.It requires a dimension and a measure which works if there is one word in text field.

I have a comment field in a table, that means text from this field needs to be broken down to words before counting words. Is that possible to do on the go? Let's say break the text field on spaces to keep it simple.

for example:

ID  Comment

1     book, pen, fail

2     pen, bird

3     book, bird, food, car

...

Thanks.

Tags (1)
1 Solution

Accepted Solutions
uzername
New Contributor III

Re: Qliksense Wordcloud using a text field

Does not seem possible on the fly. The only solution that works is breaking down the sentences to words in load time and then use this second table to count occurrences, something like this.

MyTextData:

LOAD

    ID,

    PurgeChar(Comment, ',()#"-1234567890') as TextLine

FROM [....]

(qvd)

;

MyWordList:

LOAD ID, lower(SubField(TextLine,' ')) as Word

Resident MyTextData;

...

then in charts use count() of words.

Regards.

3 Replies
lironbaram
Honored Contributor II

Re: Qliksense Wordcloud using a text field

hi

you can do this in the script or the front end using subfield function

in your example

put in the dimension the subfield(Comment,',')

or with space subfield(Comment,' ')

Khan_Mohammed
Honored Contributor II

Re: Qliksense Wordcloud using a text field

Yes.

You should have one common field linking to your word table, may be ID field from your Text table to link fact?.

In front end just use Word as your dimension and count of ids. The most commonly used word will get highlighted and have bigger fonts and vice versa.

uzername
New Contributor III

Re: Qliksense Wordcloud using a text field

Does not seem possible on the fly. The only solution that works is breaking down the sentences to words in load time and then use this second table to count occurrences, something like this.

MyTextData:

LOAD

    ID,

    PurgeChar(Comment, ',()#"-1234567890') as TextLine

FROM [....]

(qvd)

;

MyWordList:

LOAD ID, lower(SubField(TextLine,' ')) as Word

Resident MyTextData;

...

then in charts use count() of words.

Regards.

Community Browser