Author Topic: Change dimension of crosstab depending on prompt value  (Read 1377 times)

Offline philelmousse

  • Community Leader
  • *****
  • Join Date: Dec 2010
  • Posts: 180
  • Forum Citizenship: +0/-0
Change dimension of crosstab depending on prompt value
« 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

Offline pricter

  • Statesman
  • ******
  • Join Date: Feb 2006
  • Posts: 264
  • Forum Citizenship: +26/-0
Re: Change dimension of crosstab depending on prompt value
« Reply #1 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

Offline cognostechie

  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 1,666
  • Forum Citizenship: +133/-7
    • Pervisol
Re: Change dimension of crosstab depending on prompt value
« Reply #2 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.

Offline philelmousse

  • Community Leader
  • *****
  • Join Date: Dec 2010
  • Posts: 180
  • Forum Citizenship: +0/-0
Re: Change dimension of crosstab depending on prompt value
« Reply #3 on: 09 Dec 2011 07:56:35 am »
Thanks for your quick answers, I applied that and my report works fine now :)