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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

maxstring mystery

Hello... Can anyone explain how this formula is working:

=

maxstring(if(Dimensions='Product',Dimensions,null())) & ':' &

maxstring(if(Dimensions='Source',Dimensions,null())) & ':' &

maxstring(if(Dimensions='Team',Dimensions,null())) & ':'

Basically Dimensions is an inline table with 3 entries (Product, Source and Team).

I've set Dimensions up as the source for a list box and want to achieve a string showing all items selected in the list box seperated with a colon.


This all works fine... but I just don't understand how it works... I've tried breaking it down into parts but none of this seems to make sense!?!

Many thanks! Mike





10 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, both functions are working with all POSSIBLE values - they don't have to be selected.

If you are after Selected values only, you need to use different functions like GetFieldSelections:

GetFieldSelections( fieldname [, valuesep [, maxvalues=6 ]] )

returns a string containing the current selections in a given field. Valuesep is the delimiter between selected values and defaults to ', '. Maxvalues is the highest number of individual values that will be displayed before 'x of y' notation is used instead.

Examples:

getfieldselections(Country)
getfieldselections (Country, ';' )
getfieldselections (Country, ',' , 10 )