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: 
Not applicable

sorting month

Hi

I want to sort month ( in text format) but am not sure how to do it. I read many posts but was not able to figure out how to do it.

Loading order could be anything but finally sorting order should be as per calendar.

Can someone please help?

1 Solution

Accepted Solutions
Not applicable
Author

This is how this issue was resolved

I think this is converting the text to Date format which is then helping me to sort by month and year

date(date#([Fill Position Month],'MMM-YYYY'),'MMM-YYYY') as "Fill Position Month",

View solution in original post

6 Replies
sunil2288
Creator III
Creator III

Hi naveen,

You can use like this using inline function.



LOAD * INLINE [
Month, Value,
Jan, 1
Feb, 2
mar, 3
Apr, 4
May, 5
Jun, 6
July, 7
Aug, 8
Sep, 9
Oct, 10
Nov, 11
Dec, 12
];

Hope this will help you.

Thanks

Sunil

Not applicable
Author

thanks for the reply Sunil

Can you please help where should i put this code?

sunil2288
Creator III
Creator III

Hi naveen,

Put this code in the Edit Script command editor. Where u normally write the load script commands.

Thanks.

SUnil

Not applicable
Author

thanks it worked....Only thing to note is that the column name should be same in this code and with the master table which one should use for linking.

martinpohl
Partner - Master
Partner - Master

so rename the field Month in the inline load statement to your month-field-name.

Regards

Not applicable
Author

This is how this issue was resolved

I think this is converting the text to Date format which is then helping me to sort by month and year

date(date#([Fill Position Month],'MMM-YYYY'),'MMM-YYYY') as "Fill Position Month",