COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Kutti on 20 Nov 2010 10:03:29 PM

Title: How to substract months
Post by: Kutti on 20 Nov 2010 10:03:29 PM
Hi All,

I have a requirement in my project to substract the months based on the selected month from prompt page in report studio .

Ex: if i select jan 2010 from the date prompt then i need to get the data from July 2009 to Jan 2010
as  per the australian calander year.

Please help to get this logic.
Title: Re: How to substract months
Post by: TheDarkKnight on 22 Nov 2010 12:26:30 AM
Hi,
u could use _add_months function like below
_add_months(<parameter>,-10)
where
<parameter> - prompt value selected
-10 - no of months u want to subtract

Hope this helps

Cheers!!
Dinesh