Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

s33pie007
Contributor

Change Month Dimension Sort Order not working correctly

Hi everyone,

So I came across a question on the community, and I found the following:

=match([Month],'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')

using this expression, I can change the sort order for months. this works fine within a normal listbox,

but when I do the same in a multibox (when adding Month as an expression) it gives me back the numerical value for each one,

as in 1,2,3,4,5,6,7,8,9,10,11,12

How can I change this expression to give me the actual month name, instead of the numerical values?

Thanks!

Tags (3)
1 Solution

Accepted Solutions
qlikoqlik
Contributor II

Re: Change Month Dimension Sort Order not working correctly

Did you try to add the above expression in the sort tab of the properties

View solution in original post

4 Replies

Re: Change Month Dimension Sort Order not working correctly

Hi Stefan, I didn't tested but maybe?:

Dual([Month], match([Month],'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'))

If in script you create the month with the Month() funtion it will automatically save Month as a Dual value (a number with a text representation) wich can be sorted easily as it is actually a number.

qlikoqlik
Contributor II

Re: Change Month Dimension Sort Order not working correctly

Did you try to add the above expression in the sort tab of the properties

View solution in original post

arulsettu
Honored Contributor III

Re: Change Month Dimension Sort Order not working correctly

use this in script

=month(MakeDate(2000,numericMonthField))

It doesn't matter what year you use in the Makedate() function.

s33pie007
Contributor

Re: Change Month Dimension Sort Order not working correctly

so ridiculous of me!

Yes, I just used the same expression under the Sort tab for the Multibox, and it works just fine

Thank you!