Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Sorting the dimension

Hi guys,

One issue that I'm facing while using qlik sense is that if we give 'Dates' as a dimension then the graph/report is generated as per the data available in the input sheet but if I want to generate a report with sorted values of the 'dates' what should I do??Please help

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Sorting the dimension

Rather date#():

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


5 Replies
Not applicable

Re: Sorting the dimension

Go to sorting tab of the chart and ensure your date field is the first one in the list then if you load a proper date field Qlik Sense should sort the the dates correctly

Not applicable

Re: Sorting the dimension

Hi Erdal Akbulut,

Thanx for the reply but my actual problem is when I'm trying to sort the date field only the first part of the field is getting sorted,i.e,support that my date format is dd/mm/yyyy then the sort is happening only for 'dd' part where as others are not getting sorted......Result is somewhat like this 01/08/2014,01/05/2000,01/02/2001, 01/06/2033,   02/05/2016,02/08/2004,02/12/2020 etc...I think now you'l be able to understand my real issue

jyothish8807
Honored Contributor II

Re: Sorting the dimension

Hi Sumanth,

This is because QV is taking dates in text format. Try this is script:

In your normal load

load

Date(Date,'DD/MM/YYYY') as Date

from <>

You can try using Dual function also.

Regards

KC

Best Regards,
KC
mov
Esteemed Contributor III

Re: Sorting the dimension

Rather date#():

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


Not applicable

Re: Sorting the dimension

Sumanth,

As other's stated it looks like, Qlik Sense read them as text,

Check the attached file which uses a real dates and formatted/sorted correctly.

I am not sure which data source you are using but  you may fixed it in your source or use Date# and Date functions to format them as date in your load scripts.

Dates.qvf