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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
slondono
Partner - Creator II
Partner - Creator II

How to sort Date in format YYYY-NameMonth

Hi guys,

I have a date as dimension. The format of this date is for example 2015-Jan, 2015-Feb,...,2016-May, etc. But in my charts i cant find a way to order it. I need that be ordered by normal time-line.

Any idea??

(in some graphs the order is ok, but in others no. Dont know why )

1 Solution

Accepted Solutions
sunny_talwar

Change your dimension to a calculated dimension:

Date(Date#(Periodo, 'YYYY-MMM'), 'YYYY-MMM')

View solution in original post

4 Replies
sunny_talwar

Change your dimension to a calculated dimension:

Date(Date#(Periodo, 'YYYY-MMM'), 'YYYY-MMM')

Anonymous
Not applicable

Hi Sebastian,

In order expression, if this Date is text format then use

=Max({1} MakeDate(Subfield(Date,'-',1),Month(Month#(Subfield(Date,'-',1),'MMM'))))

but if your Date is in Date format, then use:

=Max({1} Date)

Thanks!!

slondono
Partner - Creator II
Partner - Creator II
Author

Theres no need to change the dimension to a calculated dimension, just put the sentence in the Order by Expression.

So much Thanks

sunny_talwar

Yes that is an alternative. I like to let my dimension drive the sort rather than adding an extra expression on sort tab. But yes, that def. works as well