Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date not sorted correctly

Hello,

I am sure this question has been asked before but I can't seem to find the answer.  I have

a selection box which contains dates in the following format:

01-DEC-2017

15-DEC-2017

22-NOV-2017

How do I get these values to be sorted in time chronological order?

Thanks!

25 Replies
Anonymous
Not applicable
Author

Vishwarath

OK.  I followed your steps.  Everything looks correct when the screen is first loaded.  However after I select "01-NOV-2017", this values goes to the bottom of the list.  Is this expected?  I don't want to the values to shift.  See my screenshot.

date_sort.jpg

Anonymous
Not applicable
Author

This is how I configured the sort.  Did I miss anything?

date_sort_2.jpg

vishsaggi
Champion III
Champion III

Did you uncheck auto ascending in the sort tab of your listbox prpoerties.?

Anonymous
Not applicable
Author

Yes, if you don't mind.  Would you put together a snippet using the values I gave in a qvw file?   I will take a look at

your qvw file to see how you did it.   Thanks so much for your time.

vishsaggi
Champion III
Champion III

Oh sorry you mean My QVW file right?

This is what i did.

Anonymous
Not applicable
Author

Hi Vishwarath,

Thanks for putting together the qvw file.  However it doesn't work the way I described it.  The

November date is at the bottom of the list when I open the document.  It should be at

the top (first one).   Also I don't see the sort expression you explained to me in your sample.

rubenmarin

Hi Sydney, if dates are real dates (they are right-aligned) you can disable sorting by expression and check only the numeric sort.

Or set your sorting expression to:

Min({1} yourSortDateField) // Selections won't affect sorting

t_chetirbok
Creator III
Creator III

don't forget about this check box

Anonymous
Not applicable
Author

Ruben,

I unchecked "sort by expression" and use "sort by numeric" as you suggested.  This seems to have fixed

my problem.

Thank you everyone who have contributed to this thread.

Anonymous
Not applicable
Author

OK.  One more issue related to this.  Now that the selection box is sorted properly.  However my

chart isn't being rendered in the correct time order.  See attached.  How do I make so that "21-Nov-2017" comes

first to the left and "19-Dec-2017" being last on the right?

date_sort_3.jpg