Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
kulasekhar
Creator
Creator

How to sort month wise in listbox

Hi All,

I have one listbox. find the atach ment.

I want display data month wise like Jan-13

                                                     Jan-14

                                                     Jan-15

                                                     Feb-13

                                                      Feb-14

                                                      Feb-15    Like this

Thanks

Sekhar.

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Use this expr in sort tab

=Date#(Left(Mth,3),'MMM') + Right(Mth,2)

View solution in original post

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Sort by text

vishsaggi
Champion III
Champion III

Hi,

You can use this expression while loading. Using Date() Function.

LOAD Date(Date(DateColumn, 'MM/DD/YYYY'), 'MMM-YY') As DateColumn

FROM .....;

Regards,

V.

vardhancse
Specialist III
Specialist III

Hi,

If we create calendar in qlikview and join to the fact table, then for every month we will give number so that we can sort based on number.

petter
Partner - Champion III
Partner - Champion III

The ability of QlikView to store values as DUAL like the date does makes it possible to have a text-representation - in this case Jan-15 to be the displayed text and the underlying value can still be a complete date value which will sort correctly - since with dual-values by default are treated like numbers in sorting....

awhitfield
Partner - Champion
Partner - Champion

Hi Kula,

looks like a custom sort order, you could add a sort flag field as below:

Data:
Load * Inline
[
Date, SortFlag
Jan-13,1
Jan-14,2
Jan-15,3
Feb-13,4
Feb-14,5
Feb-15,6
]
;

Then use this to sort by expression, simple example attached

anbu1984
Master III
Master III

Use this expr in sort tab

=Date#(Left(Mth,3),'MMM') + Right(Mth,2)

prajapatiamar38
Creator II
Creator II

Hi...

Use this expression in sort tab

=Date#(Left(Month,3),'MMM') + Right(Month,2)

As said by anbu cheliyan

It  is correct.

kji
Employee
Employee

You don't even need the SortFlag, if you make a single column table and put it early in the script (so that it is the first time the field occurs) you can use LoadOrder to sort it.

daniellial
Contributor III
Contributor III


You could create a field like a key date, with MMYYYY format, and then order by that field.