COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: philelmousse on 19 May 2011 06:29:27 AM

Title: filter a hierarchy
Post by: philelmousse on 19 May 2011 06:29:27 AM
Hello,

In my model I have a dimension "Category" with 3 differents hierarchies. I want filter a hierarchy with some categories and the other with other categories. My level "category" is composed by the "category_name" as memberCaption and "category_id" as business key.

How to do that ?
Title: Re: filter a hierarchy
Post by: philelmousse on 20 May 2011 04:02:35 AM
I will try to be more explicite...

I have a dimension named "Category".

I want make a hierarchy with (Category1, Category2) and another hierarchy with (Category3, Category4). Is it possible ?
Title: Re: filter a hierarchy
Post by: blom0344 on 20 May 2011 06:03:34 AM
I think you need to make sure that you filter in the relational model you base the dimensions on.
The filter in the dimension will always work on all hierarchies.

So basically use calculated dataitems in the relational object to split into 2 sets:

CASE << SOME OBJECT >>
WHEN << EXPRESSION1 THEN 'Category1'
WHEN << EXPRESSION2 THEN 'Category2'
ELSE NULL
END


CASE << SOME OBJECT >>
WHEN << EXPRESSION3 THEN 'Category3'
WHEN << EXPRESSION4 THEN 'Category4'
ELSE NULL
END
Title: Re: filter a hierarchy
Post by: bdbits on 20 May 2011 12:01:42 PM
You may want to put this in the model. In Report Studio you can also use the set() function.