COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gosoccer on 18 Sep 2012 01:27:52 PM

Title: Dimenstional Hierarchy Checkbox and Passing Values to Filter
Post by: gosoccer on 18 Sep 2012 01:27:52 PM
I have attached the report spec. I am trying to pass to the filter the values that are associated to each Caption of the Checkbox. I created a CSV file and brought it to Tranformer as a Datasource. Created the Cube and brought it to the Report Studio, Now, the Caption (TYPEA, TYPEB, TYPEC) are the Top Level and what I need to pass to my Query Filter are at a lower level. Any ideas what I can do to have the filter to work correctly so when the user selects TYPEA, the resulting Crosstab will only show the data for Back, Brown, Silver? Here is a sample CSV file.

TYPEA|Black
TYPEA|Brown
TYPEA|Silver
TYPEB|Brass
TYPEB|Mahogny
TYPEB|Red
TYPEC|Blue
TYPEC|Pink

here is the spec file,
Title: Re: Dimenstional Hierarchy Checkbox and Passing Values to Filter
Post by: tjohnson3050 on 18 Sep 2012 04:30:23 PM
Instead of using the caption, just use the mun.

Create a prompt using the top level of the dimension, and name the parameter 'ParameterName'.

In the crosstab, create a calculation:

descendants(?ParameterName?,1).

That will return a set that includes Black, Brown and Silver when TYPEA is chosen in the prompt.
Title: Re: Dimenstional Hierarchy Checkbox and Passing Values to Filter
Post by: gosoccer on 19 Sep 2012 08:12:27 AM
OK, thank you,
I right clicked on the Crosstab Node (Coulmn) and selected Calculate. There is Insert Custom Calculation but not sure where to go from here or am I
totally wrong? Thx so much for your time.
Title: Re: Dimenstional Hierarchy Checkbox and Passing Values to Filter
Post by: tjohnson3050 on 19 Sep 2012 08:20:14 AM
From the tool box in the insertable objects section, there is an object named query calculation.  That is what you want to use.
Title: Re: Dimenstional Hierarchy Checkbox and Passing Values to Filter
Post by: gosoccer on 19 Sep 2012 09:01:25 AM
I am getting an ugly error. I think it's getting close. thx so much! here is the spec on what I have. :-\
I dropped the calculationthe Crossbar column that the color type are. Let me know what you think at your
convenience.
Title: Re: Dimenstional Hierarchy Checkbox and Passing Values to Filter
Post by: gosoccer on 22 Sep 2012 03:58:20 PM
tj,
the following works but not sending the right arguments. it's getting the TYPEA, TYPEB, TYPEC and not the children.
would the descendant be something like

descendants([sample_checkbox_amini].[Color Type].[Color Type].[Color Code],(?ParameterName?))
Title: Re: Dimenstional Hierarchy Checkbox and Passing Values to Filter
Post by: tjohnson3050 on 22 Sep 2012 05:21:51 PM
Try this instead:

descendants(?ParameterName?,1)