Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

This expression not work Sum({<year=${vYear1}, COMPANY = {"=Rank(Sum({<year = ${vYear1}>} sales)) <= 5"}>} sales)


Hi All


Below expression work fine :-


Sum({<year={2016}, COMPANY = {"=Rank(Sum({<year = {2016}>} sales)) <= 5"}>} sales)


I want to make the above expression dynamic , so that user can select the year they like :-


Sum({<year=${vYear1}, COMPANY = {"=Rank(Sum({<year = ${vYear1}>} sales)) <= 5"}>} sales)


I also create a ver vYear1 assign as 2016


I also create a buttom when user click it will select year = 2016


But it does not work. Hope some one can help me where go wrong with the expression ?



Paul


1 Solution

Accepted Solutions
shilpan9166
Contributor II

Re: This expression not work Sum({<year=${vYear1}, COMPANY = {"=Rank(Sum({<year = ${vYear1}>} sales)) <= 5"}>} sales)

That's because you had set wrong trigger for those buttons.  See attached QVW

3 Replies

Re: This expression not work Sum({<year=${vYear1}, COMPANY = {"=Rank(Sum({<year = ${vYear1}>} sales)) <= 5"}>} sales)

This syntax is wrong ... year=${vYear1} ... and should be ... year={$(vYear1)} ...


- Marcus

Re: This expression not work Sum({<year=${vYear1}, COMPANY = {"=Rank(Sum({<year = ${vYear1}>} sales)) <= 5"}>} sales)

Try this:

Sum({<year={$(vYear1)}, COMPANY = {"=Rank(Sum({<year={$(vYear1)}>} sales))<= 5"}>} sales)

shilpan9166
Contributor II

Re: This expression not work Sum({<year=${vYear1}, COMPANY = {"=Rank(Sum({<year = ${vYear1}>} sales)) <= 5"}>} sales)

That's because you had set wrong trigger for those buttons.  See attached QVW

Community Browser