Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Zirva
Contributor III
Contributor III

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 - Specialist
Partner - Specialist

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

 

 

Check out my latest posts at datavoyagers.net

View solution in original post

2 Replies
igoralcantara
Partner - Specialist
Partner - Specialist

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

 

 

Check out my latest posts at datavoyagers.net
igoralcantara
Partner - Specialist
Partner - Specialist

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.

Check out my latest posts at datavoyagers.net