Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with List Box

Hi all

i have  straight table  with some columns.in this Date is also there .so here i am getting the Dates in a Perfect format only in the table. .but the problem is when i take only one field i.e "Date" the dates are not coming . Alternate years are coming.  .so how to sort the years like 2011,2012.

I want to do in edit script window itself only. Please find the attachment.

Thanks

6 Replies
Nicole-Smith

QlikView is actually treating your date as a text field.  In your dashboard, you need to either:

a) SET DateFormat='DD/MM/YYYY'; (in your load script)

b) When loading the date in, let QV know it is a date: date#(Date,'DD/MM/YYYY') as Date

c) Go to Document Properties > Number and set the Date field as a Date

d) On the list box, choose a calculated expression: date#(Date,'DD/MM/YYYY')

SunilChauhan
Champion II
Champion II

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

and list box properties -> sort->Numeric-> acsending


or

list box properties -> sort-> Expression_> write below

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

hope this helps

Sunil Chauhan
Anonymous
Not applicable
Author

In the object property, sort tab, you can put expression like num(Date) and order as ascending.

Hope it helps.

sundarakumar
Specialist II
Specialist II

Hi Roshan,

The data is in Text, convert it to date by

date(date) as date_date

and use the newly created date in the field and go to sort tab and check ascending..

it will work..

-sundar

sudeepkm
Specialist III
Specialist III

Have you tried sorting the Date field in the List Box by Numeric Value Asc or Desc.

PrashantSangle

Hi,

As Other People suggest you have to convert your date field into date format using date#() in your script

use

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

Then at end use 'Order By' Clause.

Like

Order By Date;

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂