Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a dynamic listbox not based on a field but an aggr() result

Hey everyone,

I am currently trying to implement a from-to selection for a list box (based on an input box referring to two variables).

The listbox presents contains the results of this statement:

=aggr(sum(Sales),CustomerNr)

While I can enter a search string into the listbox like ">500<600", it is tiresome and takes a long time if the number of my aggr-function results is large. I.e. I want to either implement a button that selects all values in the listbox between a certain range.

So I need something similar to this Creating a dynamic listbox based on input box | Qlik Community‌, just with the added auto select and the possibility of operating not on a field but on the result of my aggr-function.

Any nudge in the right direction is appreciated!

Best,

Hans

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can create a input box (or maybe a slider) with two variable vMin and vMax to enter the range values. And then use those variables in the listbox expression:

=aggr(sum({<CustomerNr={"=sum(Sales)>=$(vMin) AND sum(Sales)<=$(vMax)"}>}Sales),CustomerNr)




talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

You can create a input box (or maybe a slider) with two variable vMin and vMax to enter the range values. And then use those variables in the listbox expression:

=aggr(sum({<CustomerNr={"=sum(Sales)>=$(vMin) AND sum(Sales)<=$(vMax)"}>}Sales),CustomerNr)




talk is cheap, supply exceeds demand
Not applicable
Author

Thanks! I already had everything in place but was missing the correct Set-Analysis statement. I guess I need to study more Set Analysis to get things like this right