COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: barrysaab on 11 Mar 2012 10:39:55 AM

Title: Sort on Month Name
Post by: barrysaab on 11 Mar 2012 10:39:55 AM
I need to sort Month_Name in Cross tab which is coming up now as Aug,Feb,Dec--,I want it to be like Jan,Feb,March--Dec.The sorting option is not working.Please help.Thanks
Title: Re: Sort on Month Name
Post by: blom0344 on 11 Mar 2012 11:24:58 AM
Create an additional dataitem (using a Case expression) that adds an index to the name :  1.Jan  2. Feb  etc
Associate this with the crosstab header and use it for the underlying sort.
Title: Re: Sort on Month Name
Post by: barrysaab on 11 Mar 2012 09:56:32 PM
Thanks,blom0344.
Title: Re: Sort on Month Name
Post by: absriram on 12 Mar 2012 06:10:50 PM
Barry,

You can also use extract function to get the month number and use that as the sorting key.

Sriram.
http://www.cognosonsteroids.com (http://www.cognosonsteroids.com)
Title: Re: Sort on Month Name
Post by: barrysaab on 13 Mar 2012 02:49:52 AM
Sriram,could you please tell me how to extract the number,all i know we can extract month such as extract([Date],Month).Thanks