COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: biswasarijit84 on 16 Sep 2008 04:57:49 AM

Title: to calculate rolling 3 months data from the reporting month.(Last Month).
Post by: biswasarijit84 on 16 Sep 2008 04:57:49 AM
hi i am new in cognos. plz help me coz ihave a requirement : 1. to calculate rolling 3 months  data from the reporting month.(Last Month). in which component i should create and save it? 

Title: Re: to calculate rolling 3 months data from the reporting month.(Last Month).
Post by: Suraj on 10 Oct 2008 02:12:09 PM
first calculate current month number (1-12) from sysdate or whatever.
Then filter query like this:
[month column] >= [current month number] -3
and
[month column] <> [current month number]

If you don't have month column to compare, you need to extract that from your existing date column.
Title: Re: to calculate rolling 3 months data from the reporting month.(Last Month).
Post by: sdee_sekaran on 11 Oct 2008 08:09:42 AM
Use the Extract function add_months(Extract(?paramdate?,month),-3).