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: 
guantujiang
Contributor III
Contributor III

how to get the 2nd, 3rd maxsring from list?

we all know that MAX function get the par as OFFSET then u can get the 2nd MAX number or other any postion object in list

but how about maxstring? if I want to get sepecil postion text, just as below.

list

text1

text2

text3

text4

text5

text6

I want to the return result as text2 or anyother that I want

thanks

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can try like this

=Aggr(If(Rank(list, 1, 0) = 5, list), list)  -- for getting the second min value

or

MinString({<list-={'$(=MinString(list))'}>}list) - for getting second min

Regards,

Jagan.

View solution in original post

2 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can try like this

=Aggr(If(Rank(list, 1, 0) = 5, list), list)  -- for getting the second min value

or

MinString({<list-={'$(=MinString(list))'}>}list) - for getting second min

Regards,

Jagan.

guantujiang
Contributor III
Contributor III
Author

yes, it work, thanks