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

Need to show 12 months rolling date

Started by naveen10046, 09 Nov 2010 11:52:37 PM

Previous topic - Next topic

naveen10046

I have an item called "Resolution date" in my package, which is the only available date data item.

Now I need to show up the tickets for 12months
such as

march/2009aprl/2009may/2009.....feb/2010

Please help me to figure out how is it possible?

Thanks is advance
NaviN

blom0344

The most important function for you is the _add_months Cognos function combined with _last_of_month

Example:

_add_months(_last_of_month(current_date),-1)  yields  30 october.

Create a bucket 'Month-1' for - in this case- october:


CASE WHEN
[resolution_date] between
_add_months(_first_of_month(current_date),-1)
and
_add_months(_last_of_month(current_date),-1)
THEN [somevalue]
ELSE (0)
END