Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
New-Qlik
Creator III
Creator III

Date Sorting

I have a date column and I have converted into month-year by doing

=Month(date) & '-' & (Year(date) )

now I have two questions:

1. I am getting a date as - as one of value

2. how to sort date in month-year.

I tried doing that by going to  sorting --> expression -->Month(date) & '-' & (Year(date) ) but it didn't sort it out

5 Replies
sunny_talwar
MVP
MVP

Use this to convert date into monthYear and then sort numerically

Date(MonthStart(date)), 'MMM-YYYY')

New-Qlik
Creator III
Creator III
Author

Thanks Sunny but its coming correct in a list box but I am trying to use it in line table where

dim as =Date(MonthStart(date), 'MMM-YYYY')

measure as = count(id)

but chart is just showing year i.e consolidated of year.

sunny_talwar
MVP
MVP

Can you show an image of the line table?

New-Qlik
Creator III
Creator III
Author

sorry its line chart

1.png

tulabandula
Partner - Contributor III
Partner - Contributor III

Use the below piece of expression and check the Numeric value by Ace or desc..

MonthName(Date,'MMM-YYYY')

Then able to sort the values on month & Year.