COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: pooja on 09 Dec 2013 10:08:39 AM

Title: How to create this report
Post by: pooja on 09 Dec 2013 10:08:39 AM
Need help-

We have a req for Balance Sheet report which has inputs -
YEAR
MONTH - JAN(1)...
ComName - ABC

Output-
1) If Input YEAR = 2013 & Month = 3(March) selected then report output column should be-Dec'12 - JAN'13 - FEB'13 & Mar'13

2) If Input YEAR = 2012 & Month = 5(March) selected then report output column should be-Dec'11 - JAN'12 - FEB'12 - Mar'12 - April'12 - May '12

And so on. Basically Prior Year Dec to selected month of selected Year.
Please help how to develop this report. we are using Cube for this.
Much appreciate your help on this.

P
Title: Re: How to create this report
Post by: pooja on 09 Dec 2013 02:41:02 PM
This is actually Rolling month for last 13 months with having 5yrs data. We are using the cube for this.
Much appreciate for your help.


P
Title: Re: How to create this report
Post by: HalfBloodPrince on 09 Dec 2013 03:02:50 PM
lastPeriods (3,[2013/May]) this function will give u data for Mar , April , May
Title: Re: How to create this report
Post by: pooja on 09 Dec 2013 03:07:17 PM
Thank you.

But we have 5yrs data (09-13). How to make this possible when any year, any month selected and output should be in 13 month columns?

P
Title: Re: How to create this report
Post by: Lynn on 09 Dec 2013 03:35:03 PM
Try this except substitute the level of your time dimension. My example is based on the sales and marketing sample cube.

lastPeriods ( 13, [sales_and_marketing].[Time].[Time].[Month]->?SelectMonth? )

Title: Re: How to create this report
Post by: Francis aka khayman on 09 Dec 2013 11:29:03 PM
#2 in your first post should be 5(May) instead of 5(March) right?

and what do you mean output in 13 months column?

your first example 12-2012 to 03-2013 is 4 months and second example 12-2011 to 05-2012 is 6 months?
Title: Re: How to create this report
Post by: pooja on 10 Dec 2013 08:58:08 AM
Hi all,

Sorry for the confusion. Here are the clear picture-

1) We have 5 yrs dta (2009-2013)
2) Inputs (prompts) should have -YEAR, MONTH & COMP_NAME

FOR OUTPUT
-----------

results should populate 13 month data for any selected year/month.

Example-
If we pass the parameter for YEAR -2013 & MONTH - 2 (FEB) then results should be -

Feb'13 | Jan'13 | Dec'12 | Nov'12 | Oct'12 | Sept'12 | Aug'12 | Jul'12 | Jun'12 | May'12 | Apr'12 | Mar'12 | Feb'12


and this case applied to any selected YEAR/MONTH.
Attached is the sample. This is going to be Crosstab report.
Many many thanks for any help.

P
Title: Re: How to create this report
Post by: Lynn on 10 Dec 2013 09:19:45 AM
Ok, so still looks to me that what I suggested will work for you, just using your month level rather than the Cognos sample reference. Is that not the case?

lastPeriods ( 13, [sales_and_marketing].[Time].[Time].[Month]->?SelectMonth? )
Title: Re: How to create this report
Post by: pooja on 10 Dec 2013 09:25:27 AM
Thanks. So this expression for the PROMPT - correct?

but how we apply this for output Columns?
Title: Re: How to create this report
Post by: Lynn on 10 Dec 2013 09:28:32 AM
Drag a query calculation to the columns and put that expression in it. It will generate a prompt and then populate the columns with the 13 periods from whatever is selected.

You can create a prompt control to associate with the parameter to make a nice prompt page if you like.
Title: Re: How to create this report
Post by: Lynn on 10 Dec 2013 09:34:46 AM
Here is a dimensional function reference that is really useful. I've also attached an example using the "Sales and Marketing (cube)" package from the Cognos samples.

http://www.ibm.com/developerworks/data/library/cognos/page82.html

Title: Re: How to create this report
Post by: pooja on 10 Dec 2013 10:40:10 AM
Thank you so much. I will post how it works.
Title: Re: How to create this report
Post by: pooja on 15 Jan 2014 09:52:53 AM
Thank you. it works for 13-moth data.

One more help-

how we achieve below data using time dimension as prompt. Example-

if we select March'13 then out put should be Jan'13, Feb'13 March'13 ..and remaining months will have NO DATA
if we select July'13 then out put should be Jan'13, Feb'13 March'13, April'13, May'13, Jun'13,July'13 ..and remaining months will have NO DATA
and do on.....

thanks for help.

P