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

Sort year ',' Month

Hi - Can I sort this [MonthYear] filter based on the newest to the oldest timeframe?

rockam_0-1632998300298.png

rockam_1-1632998430062.png

Code used:-

LOAD
[year],
[year]&','& Month(Date#([month],'M')) as [MonthYear],
[month],
[date],

Num#(XXXXX) as [XXXXX],

Month(Date#([month],'M')) as [MonthName] 

Any help or suggestion would be appreciated to sort the [MonthYear].

Thanks in Advance!

Labels (5)
1 Reply
Or
MVP
MVP

Ideally, you should use MonthName(date) instead of string concatenation.

If you have to use string concatenation, you can use dual() to assign a matching date value, e.g.

dual([year]&','& Month(Date#([month],'M')),monthname(date)) as MonthYear