COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: jv_oz on 28 Jan 2020 09:31:52 PM

Title: Create MUN from Parameter
Post by: jv_oz on 28 Jan 2020 09:31:52 PM
Hello,

I am trying to create a MUN and use a parameter in it so that it is variable, based on the selection. I have a macro that appears to work that looks like this:

#'[GL].[Month].[Month]->:[TMR].[Month].[Month].[All Months^' + 'Nov' + ']'#

I then have a parameter called pMonth, that is the result of selecting a list of months.

How do I modify the macro above to use pMonth rather than 'Nov' please?

Thanks

John
Title: Re: Create MUN from Parameter
Post by: MFGF on 29 Jan 2020 07:53:42 AM
Quote from: jv_oz on 28 Jan 2020 09:31:52 PM
Hello,

I am trying to create a MUN and use a parameter in it so that it is variable, based on the selection. I have a macro that appears to work that looks like this:

#'[GL].[Month].[Month]->:[TMR].[Month].[Month].[All Months^' + 'Nov' + ']'#

I then have a parameter called pMonth, that is the result of selecting a list of months.

How do I modify the macro above to use pMonth rather than 'Nov' please?

Thanks

John

Hi,

Try replacing 'Nov' with a macro prompt in your expression. The prompt function will have three arguments in single quotes - the first is pMonth, the second is token (for the return type) and the third is Nov as a default value.

The Cognoise site won't seem to let me post the expression directly.

Cheers!

MF.

Cheers!

MF.
Title: Re: Create MUN from Parameter
Post by: jv_oz on 04 Feb 2020 04:48:30 PM
You bloody ripper. I was so close, but you nailed it for me.  Thanks heaps for your help!