Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. $300 savings extended to February 9th Learn More
priyarane
Valued Contributor

Sort in Straight Table

Hi Experts,

I need to sort the data on Date

I have Date field with to Two Dates

1 - 12/31/2014

2 - 01/01/2015

Now its looking like

Ex:

12/31/2014

12/31/2014

01/01/2015

12/31/2014

01/01/2015

12/01/2014

I want it to be 12/31/2015 first and 01/01/2015 in order

Like:

12/31/2014

12/31/2014

12/31/2014

01/01/2015

01/01/2015

01/01/2015

I have removed other sorting options on other Dim and Expr

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Sort in Straight Table

Move the date field to the top of the sort priority list on the Sort tab.

And check that your dates are real dates and not text values. Try adding the date field to a list box and changing the Number format to one of the number formats.

If your date values are text values the use the date#() function in the script to create real date values: date#(MyDate,'MM/DD/YYYY') as MyDate.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
MVP & Luminary
MVP & Luminary

Re: Sort in Straight Table

Move the date field to the top of the sort priority list on the Sort tab.

And check that your dates are real dates and not text values. Try adding the date field to a list box and changing the Number format to one of the number formats.

If your date values are text values the use the date#() function in the script to create real date values: date#(MyDate,'MM/DD/YYYY') as MyDate.


talk is cheap, supply exceeds demand

View solution in original post

MVP
MVP

Re: Sort in Straight Table

Hi

If these are proper QV dates, you can just sort them numerically. Go to the sort tab and ensure that the numeric option is ticked.

If they are strings, I recommend that you convert them to date during the load - something like

     LOAD ...

          Date(Date#(Date), 'MM/DD/YYYY')) As Date,

          ...

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein