Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort Month and Year in Order

Hi,

My file is loaded in this order(MMM YYYY) for 2010 and 2011. How do I sort this in order?  Also, when I select 2010/2011 all the months start jumping around in my graphs.

APR 2010   MAY 2010

APR 2011   MAY 2011

AUG 2010

AUG 2011

JAN 2010

JAN 2011

Thanks for the help!

5 Replies
Sokkorn
Master
Master

Hi samantham,

Any small application then would be understand well on your issue. If have any attachment then it would be easy to find solution.

Regards,

Sokkorn Cheav

Anonymous
Not applicable
Author

Dear Samantham

its better to find use function monthname(order#(Apr 2011,'MMM YYYY')) and then sort it into Ascending or descending

by ticking on the numeric sort in sort tab

do let me know wether it worked

else u can also use

Exp num(makedate( year(order#(Apr 2011,'MMM YYYY')),Month(order#(Apr 2011,'MMM YYYY')),01))

in ur sort tab it will solve ur problem

do let me know wether it worked

Thnxs

Sachin.S

kamalqlik
Partner - Specialist
Partner - Specialist

Hi Samantham the problem with your output is that ...you are getting the date as String format not as the date format.

So you are getting the desired result.First get the date in no format. for example for the field

Orderdate it may be----date(orderdate,'DD/MM/YYYY') as orderdate1

then fin the

min(orderdate1)

then make a variable $MinDate using the peek function

date(monthstart($(vMinDate) + rowno() - 1), 'MMM-YYYY') AS MonthYear.

This will give you the required result.

Hope this will help you.

If any further query than give the attached copy of your application

regards

Kamal

Sokkorn
Master
Master

Hi samantham,

Right Click on Chart ==> Sort tab ==> Select on Dimension ==> Check on Expression and past this Match(CAPITALIZE(LEFT(TRIM(Months),3)), $(=chr(39) & Replace(MonthNames, ';', chr(39) & ',' & chr(39)) & chr(39))) + (RIGHT(TRIM(Months),4) * 10)

See the attached file also.

Note: Months is the field in format (MMM YYYY).

HTH and let me know.

Regards,

Sokkorn Cheav

Not applicable
Author

Hi ,

Can you help be modify our expression if the Month is in the format MMM-YY?

Thanks

Khushboo