5 Replies Latest reply: Aug 27, 2013 5:52 AM by Yann Chapalain RSS

    Word cloud extension issue

      Hi,

       

      I would like to use the Word Cloud extension in a QlikView application. The goal of this application is to compare some Softwares relative to different Criterias, linked to different Score.

       

      The Word Cloud extension could be a good way to display the criteria according to their score. This extension has two principal fields Word and Measurement. The first one is the words to display (Criteria) and the second one is the value used to size the word (Score).

      I wrote the following expression in this field :

       

           =If(GetSelectedCount(Software)=1,Score,sum({<Software={'$(vBestSoftware)'}>} Score))

       

      My aim with this expression is :

      •      to select Score corresponding to the Criteria of the selected software,
      •      or to select Score corresponding to the Best Software if no one is selected

       

      In this second case, the extension doesn't work. Does anyone know why?

        • Re: Word cloud extension issue

          I forgot to point out : when I replace the variable vBestVariable with the software name, the extension works.

            • Re: Word cloud extension issue
              Patrik Seger

              Hi Yann

               

              Strange. When I test this both in a text box and in the WordCloud extension it works fine.

              Some questions:

              - How does Category relate to Software? Can you upload your app?

              - Why do you use Sum? Would not Only suffice?

              - How have you defined vBestSoftware?

               

              Br Patrik

                • Re: Word cloud extension issue

                  Hi Patrik,

                   

                  Thanks to have replied.

                  1 - The data are arranged like this :

                  Software1
                       Criteria1

                            ScoreCriteria1

                       Criteria2

                            ScoreCriteria2

                  Software2
                       Criteria1

                            ScoreCriteria1

                       Criteria2

                            ScoreCriteria2
                  ...

                   

                  For more details, you can take a look to the QV application I have attached to the post.

                   

                  2 - You are right, Only() is enough.

                   

                  3 - vBestSoftware is defined in the Variable Overview, and the expression I have written is :

                       only(if(aggr(rank(avg(Score)),Software)=1, Software))

                  I have done some tests, and this variable seems to return a String.

                   

                  Hope it helps.

                  Yann

                    • Re: Word cloud extension issue
                      Patrik Seger

                      Hi again

                       

                      Sorry for late answer. If you change the variable to evaluate directly (add = in the beginning) and then do not use variable expansion on other places (eg change $(vBestSoftware) to vBestSoftware in text creation). You should though keep $(vBestSoftware) in the expression for Word Cloud as before.

                       

                      This is due to that variables are not evaluated in expressions, so they need to be evaluated before (keeping one value throughout the evaluation of the expression over all dimensions).


                      Another way is only to change the expression to evaluate the varible directly:

                      =If(GetSelectedCount(Software)=1,Score,sum({<Software={'$(=$(vBestSoftware))'}>} Score))

                       

                      Br Patrik