3 Replies Latest reply: Dec 27, 2016 9:09 PM by xxx yyy RSS

    Qliksense Wordcloud using a text field

    xxx yyy

      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.

        • Re: Qliksense Wordcloud using a text field
          Liron Baram

          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,' ')

          • Re: Qliksense Wordcloud using a text field
            Aehman K

            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.

            • Re: Qliksense Wordcloud using a text field
              xxx yyy

              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.