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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kiansin
Contributor
Contributor

Sort the Date by sequence not working

Hello !!!

This table has a column called "NewDate1" 

as you can see its data inside was not by sequence

kiansin_0-1658386325779.png

My expected result should be like : 

2021 Oct 
2021 Nov
2021 Dec

2022 Jan

2022 Feb

and so on ..... 

I have already created an inline table as below :

kiansin_1-1658386459122.png

I want the NewDate1 showing by sequence instead of randomly show out

Do you know how should I do this please? Thank you very much in advance. Cheers!

1 Reply
hic
Former Employee
Former Employee

You need to interpret the string as a date when you load it. For example

Load Date#(Date1,'YYYY MMM') as Date1, ...

Then each value will get both a textual and a numeric representation, and the numeric will be used for sorting.

See also
https://community.qlik.com/t5/Qlik-Design-Blog/The-Date-Function/ba-p/1463157
https://community.qlik.com/t5/Qlik-Design-Blog/Data-Types-in-QlikView/ba-p/1474977