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

Sorting of Month filter

I have Month as a part of my key/link table since its in multiple tables. The Month is in text form. The issue is that when I put it in the filter pane, its not showing me months in the right order. I have a master table for Date where the Month is mapped against CalenderGMonthNumber which gives it the Ids. I have tried sorting it by expression and putting CalenderGMonthNumber in it but its still not showing the right order. Can someone please help with a solution? 

1 Solution

Accepted Solutions
igoralcantara
Partner - Creator II
Partner - Creator II

Use the Dual function combined with a mapping table.

for example:

map_months:

mapping

load * inline [
month, num

jan, 1

feb, 2

mar, 3

];

 

in your link table load:

 

dual( month, applymap(‘map_months’, month, 99) as month

 

 

----
datavoyagers.net

View solution in original post

2 Replies
igoralcantara
Partner - Creator II
Partner - Creator II

Use the Dual function combined with a mapping table.

for example:

map_months:

mapping

load * inline [
month, num

jan, 1

feb, 2

mar, 3

];

 

in your link table load:

 

dual( month, applymap(‘map_months’, month, 99) as month

 

 

----
datavoyagers.net
igoralcantara
Partner - Creator II
Partner - Creator II

Expanding on my example, Dual creates a field with both: text and numeric values. Now in the chart you simply sort by numerically and remove the alphabetically option.

----
datavoyagers.net