COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: b737 on 13 Oct 2016 12:37:56 PM

Title: Parallel periods using date promt
Post by: b737 on 13 Oct 2016 12:37:56 PM
Hi,
I have create crosstab report, so when I chose one period in a date prompt, for example 01.09.2016 to 30.09.2016, using add_months -12, Cognos automatically calculates parallel, referent, period, 01.09.2015-30.09.2015.

Problem is to show that on crosstab. I have succeed, as temporary solution, to put dimension Year, so it populates data for 2016 and 2015, which represent those periods, but it also shows all other years but with no data. I have suppressed those empty rows, but than I suppress and rows for 2015 and 2016 with no data, and I do not want that.
Exmp

                 Product
City1   Year   
City2   Year   


How to create, some dataItems or something else to show just that two periods as:

                                                                    Product
City1   Period1 (01.09.2015 to 30.09.2015)   
City1   Period2 (01.09.2016 to 30.09.2016)   

   Thanks
Title: Re: Parallel periods using date promt
Post by: dax on 14 Oct 2016 11:25:52 PM
Hi

We probably need a little more information to be able to provide an answer that will help.....  would the user always want from the 1st day to the last day of the month or is it possible that they might request something like 06.09.2016 to 27.10.2016?  Do you have a time dimension and how is that structured - you mentioned you have Years and does it then also include months/days?

If they would only prompt for a entire month then I would create two data items and use them in the crosstab:

[Current Period] defined as [Time Dimension].[Years].[Months]->?pCurrentPeriod?
[Current Period Last Year] defined as Lag([Current Period],12)

Depending on how your Time dimension is structured this would prompt the user for the "Current Month" and on the crosstab it would display this period and the same period 12 months before. 

Let me know if that helps you or confuses you :)

Dax






Title: Re: Parallel periods using date promt
Post by: b737 on 10 Nov 2016 11:02:52 AM
Hi,
thank you for your replay. I have not been in the office for 2 weeks so I could not try in Cognos.  8)

Yes it is possible to they might request something like 06.09.2016 to 27.10.2016

I have 3 separate dimension: Year, Month and Date(days) ,and I need to prompt on Date dimension.