COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS Impromptu => Topic started by: bindu2008 on 10 Jan 2008 02:23:10 PM

Title: Date Filter in Impromptu
Post by: bindu2008 on 10 Jan 2008 02:23:10 PM
Hi,

I am running in trouble with a requirement: myclient wants the report to look at current and previous year data excluding the current month. But  in January  he wants to look at the two previous years once again excluding  Jan data. I used thefollowing to get the current and previous:
Column yr_mn is of string type. I converted it to integer and filtered in the follwing way.



(month(today) <>1 and (yr_mn in (year(today),year(today)-1)))  or
(month(today) = 1 and (yr_mn in (year(today)-1 , year(today)-2)))

It works fine for current and previous yrs but the problem is it is showing the data of current month also which i dont want.

Can anyone help me out.
Quick replies are appreciated.

Thanks in advance!!

Bindu.





Title: Re: Date Filter in Impromptu
Post by: guruji on 02 Jul 2008 09:39:06 PM
Hi you can try this filter this will give you the result till the last month only excluding the current month.


add-year(first-of-month(now()),-1)
and add-days(first-of-month(now()),-1))

Regards
Guruji