COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: philelmousse on 08 Dec 2011 12:22:23 PM

Title: Change dimension of crosstab depending on prompt value
Post by: philelmousse on 08 Dec 2011 12:22:23 PM
Hello,

I have a crosstab report with a value prompt. If the user select 'A' i want display "Dim A" in the rows of my crosstab. And if he selects 'B', "Dim B". How to do that ?

Thanks
Title: Re: Change dimension of crosstab depending on prompt value
Post by: pricter on 08 Dec 2011 01:53:14 PM
You can achieve that by the use of the macro propmt

Marc van Waardenburg wrote a nice article about selecting a measure, check the following link

http://mecbi.blogspot.com/2010/02/interactive-measure-reports.html
Title: Re: Change dimension of crosstab depending on prompt value
Post by: cognostechie on 08 Dec 2011 01:56:37 PM
Create a Value Prompt and put the name of the Dimensions in Static Choices.

In the Use Value, use the MUN of the Dimension and in the Display Value, type in whatever you want to display.

Put a Query Calculation in the Chart where you would normally put the Dimension. Use a Prompt macro to filter the chart with the value selected from the Prompt.

Ex: #'pDim','token','[Cube Name].]Dimension Name].[Hierarchy Name].[Level Name]'#

The 3rd one in the macro above is to tell Cognos to use as a default the first time report will be run.
Title: Re: Change dimension of crosstab depending on prompt value
Post by: philelmousse on 09 Dec 2011 07:56:35 AM
Thanks for your quick answers, I applied that and my report works fine now :)