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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show the best Year from a ListBox

Hi all,

i want to show a Year with the Most frequency in Ttilte Bar form a ListBox.

I have these Script in the Title bar!


='» Top: ' & max(aggr(count(distinct id),myYear)) & ' in ' ???

How can the add the year 2007 in the title bar

error loading image

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hi there, try the following expression:

=concat({$<Year = {"=rank(aggr(count(distinct id),Year),1,1) = 1"}>} distinct Year,',')

This expression also considers the case in which more than one year share the same count of id's, displaying each year separated by a comma.

Regards

View solution in original post

1 Reply
Not applicable
Author

Hi there, try the following expression:

=concat({$<Year = {"=rank(aggr(count(distinct id),Year),1,1) = 1"}>} distinct Year,',')

This expression also considers the case in which more than one year share the same count of id's, displaying each year separated by a comma.

Regards