Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

lapertosa
New Contributor II

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
New Contributor III

Re: Multibox Sorting Issue

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

7 Replies
yoganantha321
Contributor II

Re: Multibox Sorting Issue

Hi why can't use function MonthName(Field)

lapertosa
New Contributor II

Re: Multibox Sorting Issue

Under the Sort tab as an Expression?

It didn't work

anders_thorngaa
New Contributor III

Re: Multibox Sorting Issue

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

md_qlikview
Contributor II

Re: Multibox Sorting Issue

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')

MVP
MVP

Re: Multibox Sorting Issue

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
New Contributor III

Re: Multibox Sorting Issue

Try something like this in the sort by expression window.

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

lapertosa
New Contributor II

Re: Multibox Sorting Issue

This worked great! Thanks!!

Community Browser