Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Barchart has input from list box


I have the requirement like countries in x-axis and sum(sales) in y axis.

i have list box contains 30 countries,

Requirement is like this:

list the top 4 countries whose sales greater than sales of 'india'.Here 'india' is selected from list box item.

suppose i select 'UK' from list box items.Let me know how to proceed for solution.input data must be from list box.



2 Replies
Specialist II
Specialist II

See if attached is what you are looking for. I used Country as dimension with the expression:

if(sum({1}Sales)>$(=max(aggr(sum(Sales), Country))), sum({1}Sales))

Then used dimension limits to only show Top 4 countries.

Hope this helps!

Champion III
Champion III


See attached.  The solution is based on
- a variable vCountry which is defined by =only({Alt1} Country)
- a list box Country in Alternate State Alt1
- calculated dimension in the chart
- dimension limits set to largest 4.

Not clear what you want to get.  The largest four are always the same.  Except, if you select one of the largest in the list, than the number of the largest will be less than four.  Maybe you need to clarify the requirements...