Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
In this second case, the extension doesn't work. Does anyone know why?
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
I forgot to point out : when I replace the variable vBestVariable with the software name, the extension works.
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
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
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
It works now. Thank you for your help.
Yann