Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I sort X-axis date values in ascending order?

Hi,

I am new to Qlikview. I have created a bar chart, and displaying Total Values (Count) for a month.

Problem: How do I sort X-axis date values in ascending order

Subset of Data:

Jun-15

Dec-16

Dec-16

Dec-16

Dec-16

Dec-16

Dec-16

Dec-15

Dec-15

Dec-15

Dec-15

Dec-16

Sep-15

Dec-16

Dec-16

Dec-16

Dec-15

Dec-15

Dec-15

Dec-15

Dec-15

Dec-16

Dec-16

Dec-16

Dec-16

Dec-16

Dec-16

Dec-15

Dec-15

Dec-15

Dec-16

Dec-15

Dec-16

Nov-14

Dec-16

Dec-16

Dec-16

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

If Final NGI Target Date is not date, then use Date#() as below

146263.png

View solution in original post

10 Replies
anbu1984
Master III
Master III

Add this expr to sort tab

=Date(X_Axis_Date_field,'MMM-YY')

Michiel_QV_Fan
Specialist
Specialist

Sid,

Is this date field a true date field in your script?

A date field will be ordered ascending.

Not applicable
Author

Go to Properties>Sort>State, then choose Ascending.

Best,

T

Not applicable
Author

Michiel,

I loaded data from the excel file as is. How can I make it a true date field in my script.

Thanks,

Sid

Not applicable
Author

See screenshot

Is that correct? as I am not getting the desired output

My Column name in Excel is Formatted Final NGI Target Date

Second ScreenShot..JPG

MarcoWedel

change your load script like:

LOAD Date#(month, 'MMM-YY') as  month,

          ...

FROM yourexcelfile;

Not applicable
Author

Tibor,

Chart is not sorting on State.

Thanks,

Sid

Not applicable
Author

It isn't beacuse you use date as expression, not as dimension. Try using it as dimension, then you will be able to sort it.

anbu1984
Master III
Master III

If Final NGI Target Date is not date, then use Date#() as below

146263.png