Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi - wondering if anyone have any thoughts on the approach of my problem.
I want to have my bar chart render on a click of a button to show me 'Top 10' and 'Bottom 10' values based on my 'sales' and 'account' columns.
I have my syntax ready and believe they should be placed in the actual button section:
Top 10 =
sum({<Account={"=Rank(Sum(Sales))<=10"}>} Sales)
Bottom 10 =
SUM({<Account = {"=Rank(-SUM(Sales)<=10"}>}Sales)
My confusion - on the below image, I am not sure how this linkage is created given that I can only tie this qsVariable extension to one variable (vTopBot).
I am also unsure what I am supposed to define within my given variable in order to produce the top and bot 10 values for my chart. Any help would be greatly appreciated
In your bar chart, make your Measure
=$(vTopBot)
In your Top10 button, assign the value (note the single quotes)
='sum({<Account={"=Rank(Sum(Sales))<=10"}>} Sales)'
to the vTopBot variable. Do the same for the Bottom 10 button.
You can also get clever and make your chart measure:
=sum({<Account={"=$(vTopBot)Rank(Sum(Sales))<=10"}>} Sales)
and use the buttons to assign '' or '-' to the vTopBot.
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
Not sure why I wasn't getting any notifications so I have asked this question again thinking my post never went through. I followed your advice but am getting the same values.
I placed the variable $(vTopBot) into the measure of the bar chart, but still having trouble getting results as expected. Here is a snip of what my vTopBot variable is defined as which I believe may be causing the problem?
I think you failed to put the single quotes around the values?
Note that the buttons will not change the variable values, but it will not change the visible value in the variable overview dialog.
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com