Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

List box sorting by customer order value, need to limit to only show top 50

I have an issue I am trying to work out. I am trying to have a list box that allows selection of top 50 customers.

Currently I have the list box displaying customers, sorted by this expression: =aggr(sum([Order Amount]),Customer)

This is correctly listing the customers to show the Top customer at the top, lowest at the bottom. Now I need to reduce this list to only show 50 values. Is this possible?

I could also work with a button that selects the top 50, I just do not know where to start.

1 Solution

Accepted Solutions
MVP
MVP

Re: List box sorting by customer order value, need to limit to only show top 50

I believe this?  (Edit: To clarify, this should be the list box expression, not the sort expression.  Your sort expression is probably fine, though it could probably just be sum([Order Amount]).)

=aggr(if(rank(sum([Order Amount]))<=50,Customer),Customer)

4 Replies
Employee
Employee

List box sorting by customer order value, need to limit to only show top 50

Have you considered using a straight table chart instead? Use customer as dimension, sum([Order Amount] as expression. Sort by expression, turn off interactive sort in the same tab. Then you can limit it to show the first 50 values.

Added value is that you will get totals and the order amount of each customer in the same object and save some screen space

MVP
MVP

Re: List box sorting by customer order value, need to limit to only show top 50

I believe this?  (Edit: To clarify, this should be the list box expression, not the sort expression.  Your sort expression is probably fine, though it could probably just be sum([Order Amount]).)

=aggr(if(rank(sum([Order Amount]))<=50,Customer),Customer)

Not applicable

List box sorting by customer order value, need to limit to only show top 50

This is what I ended up doing. This is helpful, just had some issues where it does not highlight green when selected

Not applicable

List box sorting by customer order value, need to limit to only show top 50

Thank you John this works wonderfully.