If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How can I get the month on my charts to stay in the right order?

Started by Cogno-Gulf, 15 Apr 2009 06:24:57 PM

Previous topic - Next topic

Cogno-Gulf

Hello All,

I have two charts with similiar scripts, but on the charts display the data on the differently. I want to have the month name to appear in order. One has is in the correct calendar order and the other has it in alphabetical order. Can someone help.

Here is my script for the correct order of how the THEN variable appears:
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-01-01 and 2009-02-01) then ('JAN') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-02-01 and 2009-03-01) then ('FEB') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-03-01 and 2009-04-01) then ('MAR') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-04-01 and 2009-05-01) then ('APR') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-05-01 and 2009-06-01) then ('MAY') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-06-01 and 2009-07-01) then ('JUN') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-07-01 and 2009-08-01) then ('JUL') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-08-01 and 2009-09-01) then ('AUG') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-09-01 and 2009-10-01) then ('SEP') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-10-01 and 2009-11-01) then ('OCT') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-11-01 and 2009-12-01) then ('NOV') else
if([SAV-Tables].[PURCHASE_ORDERS_MASTER].[CUTDATE] between 2009-12-01 and 2010-01-01) then ('DEC') else null

Here is my script for the incorrect order of how the THEN variable appears:
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE]between 2009-01-01 and 2009-02-01) then ('JAN') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-02-01 and 2009-03-01) then ('FEB') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-03-01 and 2009-04-01) then ('MAR') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-04-01 and 2009-05-01) then ('APR') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-05-01 and 2009-06-01) then ('MAY') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-06-01 and 2009-07-01) then ('JUN') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-07-01 and 2009-08-01) then ('JUL') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-08-01 and 2009-09-01) then ('AUG') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-09-01 and 2009-10-01) then ('SEP') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-10-01 and 2009-11-01) then ('OCT') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-11-01 and 2009-12-01) then ('NOV') else
if ([SAV-Tables].[PURCHASE_REQUESTS_COMMON].[REQUESTDATE] between 2009-12-01 and 2010-01-01) then ('DEC') else null

HalfBloodPrince

First Sort ur date column ascending order. then for this calculated column go to Advance sort add this calculated column  below the Date column.

Thanks,