Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
lapertosa
Contributor III
Contributor III

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)

lapertosa
Contributor III
Contributor III
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
Partner

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
Partner

Try something like this in the sort by expression window.

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

lapertosa
Contributor III
Contributor III
Author

This worked great! Thanks!!