Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multibox Sorting Issue

Hi all,

I'm having a problem to sort in a Multibox that uses an expression as selection field.

The Expression is:

=Year&'-'&Month

Though the Month field is shown as text (Jan, Feb, Mar...) and it the sort it's showing all scrambled:

QlikView Help8.png

Any idea how to fix it?

Thanks!

1 Solution

Accepted Solutions
anders_thorngaa
Contributor III
Contributor III

Under the Sort tab, sort according to Expression: Year*100+Month

View solution in original post

7 Replies
yoganantha321
Creator II
Creator II

Hi why can't use function MonthName(Field)

Anonymous
Not applicable
Author

Under the Sort tab as an Expression?

It didn't work

anders_thorngaa
Contributor III
Contributor III

Under the Sort tab, sort according to Expression: Year*100+Month

md_qlikview
Creator II
Creator II

Hi,

Use Below Set Expression Under Sort By Expression. Keep order Ascending. Deselect all other sorting options.

=Match(FieldName, '2017-Jan','2017-Feb','2017-Mar','2017-Apr','2017-May','2017-Jun','2017-Jul','2017-Aug','2017-Sep','2017-Oct','2017-Nov','2017-Dec')

jonathandienst
Partner - Champion III
Partner - Champion III

The best solution is not to sort on the expression at all. Rather create a MonthYear field during the load using Date#() and MonthName():

     LOAD ....

          Year,

          Month,

          MonthName(Date#(Year & Month, 'yyyyMMM')) as YearMonth,

          ...

Now use MonthYear in the list box and sort by numeric (date) value.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sravan_v007
Partner - Contributor III
Partner - Contributor III

Try something like this in the sort by expression window.

=max({1<Sort={">=$(=max(CalenderDate))+1,-12)) <=$(=max(CalenderDate))"}>} CalenderDate)

Anonymous
Not applicable
Author

This worked great! Thanks!!