5 Replies Latest reply: Feb 3, 2012 12:50 PM by javierortiz

Month order changes when select a month. How I can Fix this?

Hi all, I don´t understand why the month order changes when I select a month, it moves, could somebody help me?

I attached the app.

Thank you!!

• Re: Month order changes when select a month. How I can Fix this?

Define the month as a Dual, e.g.

dual (Mes,[Mes Num]) as Mes

and then sort the list box numerically instead of using a formula.

• Month order changes when select a month. How I can Fix this?

Henric,

I just wanted to suggest the same, you were a lot faster

You seem to be somewhat closer to developement than me, do you know the reason why a formula behaves different from the numerical sort in that case?

• Month order changes when select a month. How I can Fix this?

Yes, I work for QlikTech and have been with R&D for some years...

I am not 100% sure, but I suspect that text sort and numeric sort are defined for excluded values also, whereas sort by expression does not work for the excluded values - the calculation can only be made for possible values. In the latter case QlikView reverts to the data order for the excluded values. And the data order is arbitrary.

Does that make sense?

• Month order changes when select a month. How I can Fix this?

What you are saying is at least what we do observe, though I think this behaviour is not very intuitive.

But thanks for the information.

I just double checked the Help, it says for sort by expression:

 Sorts the field values according to the expression entered into the text edit box below this sort option. If using sort by expression, an alternative set of records must be defined by a set expression. See also Set Analysis.

Aha, indeed, a

=only({1} [Mes Num])

works as expected...

Learned something new today.

• Month order changes when select a month. How I can Fix this?

Yes Stefan, It Works perfectly using =only({1} [Mes Num]).

Thank you Both!!