COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: ian.hawksey on 02 Nov 2010 10:55:12 AM

Title: Find previous week from a prompted week number
Post by: ian.hawksey on 02 Nov 2010 10:55:12 AM
Hi guys.
Using Report Studio 8.3 against a Cognos cube.

I have set up a prompt, where the user selects a week number from a dimension, and I now want a column in the report to show a value for the week previous to the one selected
eg user selects week 50
I want the report to show the cost for week 49

I've tried various functions without success.

Any suggestions?

Thanks in advance
Title: Re: Find previous week from a prompted week number
Post by: CognosPaul on 02 Nov 2010 11:52:30 AM
All you should need to do is something like:
prevMember(#prompt('weekNumber','memberuniquename')#) where weekNumber is your parameter name.

If this doesn't work make sure that the value prompt is returning a mun instead of a category code. If you're using detail filters then there is a very good chance this won't work.
Title: Re: Find previous week from a prompted week number
Post by: ian.hawksey on 04 Nov 2010 10:35:10 AM
PaulM.
Unfortunately I didn't get to try this out as the user requirement changed !

Thanks anyway
Title: Re: Find previous week from a prompted week number
Post by: CognosPaul on 04 Nov 2010 11:34:47 AM
I'd suggest trying it anyway. Dimensional reporting has a fairly steep learning curve, but once you understand it you can do a lot. Understanding dimensional functions now will save a lot of headaches later.