3 Replies Latest reply: Feb 25, 2018 10:14 PM by Shilpan Patel

# 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

• ###### 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)

• ###### 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