If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Filtering tree prompt based on another dimension

Started by Brecht, 03 Oct 2011 07:32:54 AM

Previous topic - Next topic

Brecht

I am reporting on a Powercube with dimensions 'Store' and 'Employee' (just an example) with the following hierarchies:
Store: Country > City > Street > Store
Employee: Country > City > Manager > Employee

On top of each interactive report I want 2 tree prompts: one for each hierarchy. The store prompt starts from the Country level, the employee prompt from the manager level. As soon as a Country or City has been selected in the first prompt I want to be able to click a 'Reprompt' button to filter the second tree prompt and only see the managers in  the country/city that I have selected.

As these are different dimensions I tried to filter based on their caption. For example:
filter([Cube].[Dim].[Hier].[Countries];caption(currentMember([Cube].[Dim].[Hier])) in (caption([Selected Countries])))

The 'Selected Countries' set contains the correct countries but I get the following error:
"Use of a 'roleValue' expression returning multiple values at right hand side of a value comparison expression is not valid"

Any ideas?

CognosPaul

This is very difficult to answer as I don't have access to a cube that has a similar structure.

Try the following:

generate([Selected Countries],
filter([Cube].[Dim1].[Hier].[Countries], caption(currentMember([Cube].[Dim1].[Hier])) = caption(currentMember([Cube].[Dim2].[Hier]))

This should run the filter function against every member in the [Selected Countries] set, and return the results as a union.