Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Jason_KKA
Contributor II
Contributor II

Ordering of Months in Drop Down Menu

Hi, 

I am trying to sort the Months here in ascending order in the drop down menu for this filter pane in one of my sheets.

On the charts/visualizations, the months are sorted properly from Jan to Dec. I would like the same order for the drop down menu too, but had no success in doing so after trying out different sorting configurations while editing the sheet (See the sorting settings). Any advice would be appreciated.

(FYI, the first row in the dataset starts with a date in June last year, and continues up to Feb this year.)

2 Solutions

Accepted Solutions
vikasmahajan

Hi,

Trick is use monthno for sorting in your script add like following & then sort on month no this will sort like jan Dec

Month , MonthNo

Jan,1

Feb,2

Mar,3

Apr , 4

May , 5

June,6

July,7

Aug,8

sep,9

Oct,10

Nov,11

Dec,12

 

Hope this help you

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

vikasmahajan

if you have calendar then incorporate this in calendar script

If(Num(Month(TempDate))>3,Num(Month(TempDate))-3,Num(Month(TempDate))+9) AS MonthNumber,

 

use monthnumber for sorting date.

Thanks

Vikas 

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

3 Replies
vikasmahajan

Hi,

Trick is use monthno for sorting in your script add like following & then sort on month no this will sort like jan Dec

Month , MonthNo

Jan,1

Feb,2

Mar,3

Apr , 4

May , 5

June,6

July,7

Aug,8

sep,9

Oct,10

Nov,11

Dec,12

 

Hope this help you

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Jason_KKA
Contributor II
Contributor II
Author

Thanks, @vikasmahajan for the suggestion. Can advise whether this syntax is to be addes in the data load editor or in the sorting expression?

vikasmahajan

if you have calendar then incorporate this in calendar script

If(Num(Month(TempDate))>3,Num(Month(TempDate))-3,Num(Month(TempDate))+9) AS MonthNumber,

 

use monthnumber for sorting date.

Thanks

Vikas 

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.