COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Shailaja0520 on 28 Jul 2011 02:45:47 AM

Title: Get last 3 quarters when selecting month in tree prompt
Post by: Shailaja0520 on 28 Jul 2011 02:45:47 AM
Ihave hierarchy like this
Year -Quarter -Month

2011
Q1 2011
Jan 2011
Feb 2011
Mar 2011

Now if i select July 2011 it should display in crosstab last 3 quarters including the present  quarter
i.e   July 2011,Mar 2011, Dec 2010,Sep 2010
Title: Re: Get last 3 quarters when selecting month in tree prompt
Post by: leahmarie on 28 Jul 2011 11:15:42 AM
Are you wanting the same month of the last three quarters or all months of the last three quarters? Because the two would make the formula much different.

For example:

you can do lead(?parameter month?, 3) to get the three months following, or lag(?parameter month?, 3) to get three months prior.