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

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?

1 Solution

Accepted Solutions
patrik_seger
Partner - Creator
Partner - Creator

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

View solution in original post

5 Replies
Not applicable
Author

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

patrik_seger
Partner - Creator
Partner - Creator

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

Not applicable
Author

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

patrik_seger
Partner - Creator
Partner - Creator

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

Not applicable
Author

It works now. Thank you for your help.

Yann