Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to sort a listbox with monthname so that the order will be Jan, Feb, Mar ...
I also want to keep this sorting even if the user selects a few months.
A demo app with the functionality can be found here: QlikView
I've used an inline table with the monthname and the sort order
Join(DIM_Time)
MonthSorting:
LOAD * INLINE
[
MonthName, Sort order
JAN, 1
FEB, 2
MAR, 3f
Then I uncheck the state option under Properties -> Sort for the listbox and select Expression =[Sort order]
This works fine until a month is selected. Then the list will move the selected months to the end of the listbox. How can I avoid this?
Try sorting by this expression: only({1}[Sort order])
To explain, if you select some months only sort order of the selected months are used in the expression. For the other months the sort order is null so those are shown first. The {1} means that selections are disregarded so the sort order value of all months are used for the sorting expression.
Try sorting by this expression: only({1}[Sort order])
To explain, if you select some months only sort order of the selected months are used in the expression. For the other months the sort order is null so those are shown first. The {1} means that selections are disregarded so the sort order value of all months are used for the sorting expression.
That worked great!
Also, thank you for the explanation!