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: 
amien
Specialist
Specialist

GetFieldSelections Rank by Selections

GetFieldSelections(selectionDim,'|',100)

Is it possible to rank this string by the first selection first and then the second?

So if i now select : A,C,B, my result of the GetFieldSelections will be : A,B,C

I want the result : A,C,B

Thanks in Advanced

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Qlikview does not store the order of selections, They will be listed in load order, I think.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
marcus_sommer

You could try it with concat(distinct selectionDim,',').

- Marcus

jonathandienst
Partner - Champion III
Partner - Champion III

@Marcus - I don't believe that will list in the order the selections were made. It will be sorted by load order.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
marcus_sommer

Yes you are right, the order from selections couldn't be recorded in this way - the only possible way would be to use several variables which are triggered from those selections and which compare the current selection with the stored previous selection and adds then the differences and so on. But this will take a lot of efforts to create complex string-checks especially by consideration from multiple selections at one time by using the ctrl-key.

But beside them will concat sort all dimension-values in an alphabetically order and if this dimension has an assigned numeric value or it will be some created maybe in a dual() then it could be used for sorting the values.

- Marcus

Not applicable

Agreed, don't thinks selections are stored in that way. Would need to potentially ensure selections were made one at a time and fill a variable as you go to store it, but that would just get messy to manage really.