COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: deepak2k2 on 29 Oct 2010 01:09:37 AM

Title: 12 months rolling
Post by: deepak2k2 on 29 Oct 2010 01:09:37 AM
Hi,
I've 80% done with my report.  But i got stuck up with my prompt selection.

My requirement is if i select the prompt(mmm/yyyy), so that i could get (selected month -12) in my cross tab.  Ex:  if i select Oct2009 in my value prompt, cross should show Oct 2008 to Oct 2009. 

I know how to do it Relational Model, but i'm buidling the reports using Dimensional Model.

Please give me suggetion, how to implement it?
Title: Re: 12 months rolling
Post by: deepak2k2 on 29 Oct 2010 05:57:27 AM
Anyone is there to answer my query?

Its really appreciated.
Title: Re: 12 months rolling
Post by: rockytopmark on 29 Oct 2010 10:40:19 AM
From the dreaded On-Line help:

lastPeriods ( integer_exp , member )
Returns the set of members from the same level that ends with the specified member. The number of members returned is the absolute value of "integer_exp".  If "integer_exp" is negative, members following and including the specified member are returned. Typically used with a time dimension.
Title: Re: 12 months rolling
Post by: deepak2k2 on 29 Oct 2010 11:08:39 AM
Thanks for the reply.

When i use it, it shows an error "Invalid coercion from 'hierarchy' to 'member'".

Please give suggestions.
Title: Re: 12 months rolling
Post by: deepak2k2 on 29 Oct 2010 09:12:50 PM
any more suggestions...
Title: Re: 12 months rolling
Post by: MFGF on 01 Nov 2010 11:16:35 AM
Quote from: deepak2k2 on 29 Oct 2010 11:08:39 AM
Thanks for the reply.

When i use it, it shows an error "Invalid coercion from 'hierarchy' to 'member'".

Please give suggestions.

I'd suggest you are seeing this error because you have used a Hierarchy in your expression rather than a member from a level.

Can you share with us the exact expression you used?

Regards,

MF.