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

Sorting issue in date

Hi All,

I have taken invoice date and more 5 fields as dimension my requirement is that I want data sorting as by Invoce date.

For that I took  = num(month([First Invioce Date])) dimension in first column but data is not sorted as per our requirement.

My expected output is

sorted data should come as apr-14

                                         May-14

                                          aug-14

                                           ................

                                       apr 15 like this.

But still am getting below sorting which not correct. Please help

sort.png

19 Replies
swuehl
MVP
MVP

Maybe change the sort option for first dimension to numeric ascending?

Anonymous
Not applicable

cud u share some sample data??

prma7799
Master III
Master III
Author

Hi Swuehl,

I tried but it will come from 1 2 3 or you can say Jan 15 Feb 15 ...

Thanks

prma7799
Master III
Master III
Author

Sorry Balraj I can not share the data.

Anonymous
Not applicable

what is this sort field?

I would say promote your data fields as a First Dimension and then try asc or desc..

swuehl
MVP
MVP

If you don't want the month numbers, why not just use another QV date function, like

= MonthName([First Invioce Date])


as dimension?

prma7799
Master III
Master III
Author

I cant promote because user want first invoice date should there in first column.

Anonymous
Not applicable

Convert your invoice data field into number at script level, then put that field as expression in sort tab(See the attachment)

like:

num(InvoiceDate) as DateNum

then put it as a expression under sort Tab in expression of Invoice Date dimension & sort it asc or desc

prma7799
Master III
Master III
Author

As you have seen my expected out put I want sorting data from month Apr....

and for num(InvoiceDate) as DateNum I have already take this in my dimension .