Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting First value in a List Box selection

Hi All,

I have a case where a user can select more than one item in a list box. I want to use the first item selected in a chart. For example, if my list box is as shown below with the selections show, how can I extract POR1H14 as the Top item and use this in my chart? I've tried GetFieldSelections etc but am struggling on how to get the 'top' list item selected... All help much appreciated

John

Capture.PNG.png


2 Replies
tresesco
MVP
MVP

Try: =MinString([Forecast Version])

Chart Dimension: [Forecast Version], expression like: =Sum({< [Forecast Version] ={'$(=MinString([Forecast Version]))'}>} YourField)

Not applicable
Author

John,

you must take care to have the same sort order in listbox and your function. If values in listbox are sorted by its string value, it will be easy with maxstring or minstring. If there is some other field (for example with id), you may use FirstSortedValue().

regards

Darek