Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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!!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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.

View solution in original post

5 Replies
hic
Former Employee
Former Employee

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.

swuehl
MVP
MVP

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?

hic
Former Employee
Former Employee

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?

swuehl
MVP
MVP

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.

Not applicable
Author

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

Thank you Both!!