Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am trying to order a list of months in chronological order (January, February, March, etc), not in alphabetical order as shown below:
Anyone knows how i can do that?
Regards
If they are listed in the script as you want them, then just select "Load Order" under the sorting tab in the properties menu.
OR if you want to do it manually, Just put this code in the Expression section, under the sorting tab.
avg({1}match(MonthField, 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'))
How are you creating it in the script? Using Month() function or not? If you are, then you just need to sort them in Numerical Ascending order. If you are not then use a sort expression like this:
=Date#(MonthFieldName, 'MMMM')
Use a dual value when creating the field values (either by using the QV date and time functions, or using DUAL()).
Then your list of months will be sorted correctly by default (using numeric sort).
If they are listed in the script as you want them, then just select "Load Order" under the sorting tab in the properties menu.
OR if you want to do it manually, Just put this code in the Expression section, under the sorting tab.
avg({1}match(MonthField, 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'))
Hi Sunny Talwar,
I am not using the Month() function.
Actually, months are in a column of my data base, so it is a field called "Month".
Thanks
Thanks Crystles, your tip solve my problem.
Have a nice weekend
Awesome! I'm glad it worked for you!
Hope you have a nice weekend too!