1

I have a value prompt with a static selection of choices (i.e. '2010', '2011', '2012', etc.). This value prompt is associated with a parameter in my Master Query called "pYearString". This master query again contains a Data Item ('YearString') which references this parameter, like this:

#prompt('pYearString', 'string', '2013')#

Through a master detail relationship, this Data Item is then again associated with a parameter in a detailed query, as can be shown here: (I have stripped the image for everything that I considered irrelevant).

MasterDetailRelationship

One of the data items in the detailed query ('ActualsThisYear') then again references this parameter, like this:

tuple(#"[My_Cube].[Time].[Time].[Year]->:[TM].[Time].[Time].[@MEMBER].[" + strip(prompt("pYear"), "'") + "]"#, [Actuals])

In which the first argument is a MUN to the selected year in my Time dimension. This is working fine, and I get the correct numbers. This means that the parameter in the detailed query is referenced correctly.

However, if I try to add a layout calculation to my column header in order to show the chosen year, nothing is displayed. The layout calculation could look something like this:

' ' + ParamDisplayValue('pYear')

This layout calculation was working perfectly fine when the parameter value was given directly from the value prompt, as opposed to through the master detail relationship I'm using now.

If someone is wondering why I'm using this cumbersome master detail relationship, it is because I need to manipulate the input in certain ways, which is not possible otherwise.

Does anyone know why this is happening, or even how to fix this?

Thanks in advance!

EDIT: The question is really boiling down to: Is it not possible to use layout calculations on parameters in detailed queries when their value is given through a Master-Detail Relationship?

Skovly
  • 234
  • 1
  • 8
  • 22

1 Answers1

2
  1. Try using ParamValue instead.

  2. Alternativly, add YearString to Parameters list for that query and refer that dataitem in report calculation.

  3. Also you can change property of the column header to DataItem Vaule and put your macro into that data item.

Stoleg
  • 8,972
  • 1
  • 21
  • 28
  • 1
    Thanks alot, @Stoleg ! 1. Did not work. 2. Did not understand "add YearString to Parameters list", but I referred to the YearString DataItem in the MasterQuery directly from the Layout (Report) Calculation instead (i.e [MasterQuery].[YearString]), and since the value of the 'pYear' parameter in the detailed query is given by the YearString DataItem, the value of those two should be equal at any given time. Hence, this option provided a desirable outcome. 3. Unfortunately, this would not solve my real issue. – Skovly Nov 21 '13 at 17:03
  • The answer in this post supports the use of Data Items directly in the report, as apposed to refering to them through Layout Calculations. http://stackoverflow.com/questions/20700555/ibm-cognos-report-studio-arbitrary-errors-when-using-if-case-on-an-tm1-cube – Skovly Jan 22 '14 at 07:17
  • Additionally, it might be worth adding that I had to associate the page with the query before being able to insert Data Items directly onto the page. – Skovly Jan 22 '14 at 07:18