COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: alex_ on 01 Dec 2012 04:49:00 PM

Title: I have to show the selected quarter and previous quarter.
Post by: alex_ on 01 Dec 2012 04:49:00 PM
Hi,

I'm using relational model.

I have a prompt page in which can select the desired Quarter, but unless selected Quarter in the report should display and previous Quarter.

I have defined Quarters in Data Model.   
How do I make the filter to leave and previous Quarter?

I have to show the selected quarter and previous quarter.

Thanks :)
Title: Re: I have to show the selected quarter and previous quarter.
Post by: pricter on 02 Dec 2012 05:51:12 AM
How you have define the previous quarter?

For example 2012Q1
Title: Re: I have to show the selected quarter and previous quarter.
Post by: alex_ on 02 Dec 2012 06:08:03 AM
This is the problem.

For example: If you select in prompt page 2012 Q1. The report must to show 2011 Q4 and 2012 Q1.
Title: Re: I have to show the selected quarter and previous quarter.
Post by: pricter on 02 Dec 2012 07:21:19 AM
Create a data item to find the next quarter from the date ( usually with dateadd and datepart you can achieve that,
I do not know which database you use in order to be more specific)
and then add a filter
[Quarter]=?Quarter? or [NextQuarter]=?Quarter?
Title: Re: I have to show the selected quarter and previous quarter.
Post by: alex_ on 02 Dec 2012 08:14:59 AM
In the database contains column defined 'Quarter', witch contain following rows:
      2011-Q1,
       2011-Q2,
      2011-Q3,
      2011-Q4,
      2012-Q1,
       2012-Q2,
       2012-Q3,
       2012-Q4

From there I take 'Quarter'.