Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
aditya_pratap
Contributor III
Contributor III

Month Sorting

Hi Everyone,@Michael_Tarallo @mbj @petter @richbyard @Mp3Leaks @rohitk1609 @Marcus_Spitzmiller @ergustafsson @Masaki_Hamano @Sue_Macaluso 

Good Evening

In this app i am using month column and i have months from feb to sep but i am not getting in sort order like feb, march, april, may , june but i am getting in different order as u can see in picture .Kindly help me in this.

aditya_pratap_0-1665054884763.png

Thanks 
Aditya

 

3 Replies
Mark_Little
Luminary
Luminary

HI @aditya_pratap 

 

Check the Sorting on the column. Depending on you data it may be as simple and tick sort numerically.

 

aditya_pratap
Contributor III
Contributor III
Author

aditya_pratap_0-1665068332720.png

Hi Not coming I tried that u have said to me 

Thanks 

Aditya

 

RsQK
Creator II
Creator II

Hi, there are various ways how to do this, one quite simple would be to make this "textual" field as a "dual" field. The script would be something along the lines of this:

ml_month_sort:
MAPPING LOAD
Month,
ROWNO()
INLINE [
Month
January
February
March
April
May
June
July
August
September
October
November
December
];

data:
LOAD *,
DUAL(Month,APPLYMAP('ml_month_sort',Month))	as MonthSorted;

LOAD 
TEXT(Month)	as Month
INLINE [
Month
April
August
December
February
January
July
June
March
May
September
October
November
];

 

and in the frontend with auto sorting settings:

RsQK_0-1665069798905.png