Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort values in multibox dropdowns

Hi,

I have a multibox with a dropdown. Its values are calculated by a simple string function:

=Left(product_code,1)

the product codes look like this:

1-2234
1-2111
2-3231
a.s.o.

Here is the problem: the dropdown is populated with values in random order, i.e. [EDIT: see bottom!]

2
1
5
3
4

But it would be much more convenient to have it

1
2
3
4
5

... of course. how can this be done?

EDIT: I just saved and reloaded my QV file - and now the values are sorted. Does anyone have a clue what might have caused this?

Regards,

George

6 Replies
Not applicable
Author

go to sort tab in the multi box properties and check numeric value ascending

Anonymous
Not applicable
Author

Two quick possibilities:

1. Load this as a separate field in the script:

Left(product_code,1) as MultiboxField

2. Go to Multibox properties and the Sort tab where you set the expression to be sorted by expression and use the same one there: =Left(product_code,1) ascending

Not applicable
Author

Thanks for your suggestions.

However, I have a problem with solutions 2, because there simply is no sort option if the field is calculated field. Only the "real" fields show up here.

EDIT: Sorry, this is getting weird. Now even the product values are not sorted, though I set it to do so in the sort options...

EDIT2: This IS weird. I got a copy of the QV file which sorts the values and one which doesn't though the settings are the same. (If I did not overlook something.)

Regards,

George

prieper
Master II
Master II

post it and we may have a look at!

Peter

Anonymous
Not applicable
Author

I also would like to take a look at the two "identical" copies that behave differently. Although it wouldn't surprise me... Not sure you can hava a relaible sorting on a calculated field. It's better to use option 1 from Johannes if sorting is of any importance.

Not applicable
Author

i did the same, just that i use subfield.

Thereotically, it should work. but it didnt.

weird and strange.