Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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