COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gosoccer on 08 Aug 2014 01:26:51 PM

Title: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: gosoccer on 08 Aug 2014 01:26:51 PM
I'm using Report Author 10.1.2/OLAP.

If anybody knows how to create a single Data Item that includes the members from two separate hierarchies, could you
please let  me know. I tried Creating a Union by using the union (experession1, expression 2) but getting error.

Thx in advance for your time.
Title: Re: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: bdbits on 08 Aug 2014 04:27:26 PM
I think you are looking for the union() dimensional function. The following is from the "information" section in the expression editor.

union ( set_expression1 , set_expression2 [ , all ] )
Returns data for "set_expression1" and "set_expression2". The result retains duplicates only when the optional keyword "all" is supplied as the third argument.

Example: union ( set ( [Camping Equipment] , [Golf Equipment] ) , set ( [Golf Equipment] , [Mountaineering Equipment] ) )
Result: Returns data for both sets as one new set, showing the Golf Equipment column only once.
Title: Re: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: gosoccer on 09 Aug 2014 02:52:49 PM
Hi there,
I tried your suggestion but getting the following error.

union(set([user],[residential-address]),set([logon],[logoff]))

but I'm getting the following error,

    The set 'unionSet' cannot have members from different hierarchies.
Thx
Title: Re: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: gosoccer on 11 Aug 2014 07:17:34 AM
If anybody has any ideas about this simple need, please let me know. I'm going to go after Intersection since it can
bring members from different hierarchies. Any sample code is greatly appreciate it.

Thank you
Title: Re: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: MFGF on 11 Aug 2014 11:12:17 AM
Hi,

When you refer to wanting a single data item including members from two separate hierarchies, can you clarify what you mean? Are you looking for a single result (ie the measure at the intersection of those members?) Something else?

MF.
Title: Re: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: gosoccer on 11 Aug 2014 11:26:29 AM
yes,

all I need to do is to create the Data Item or any other way to populate the Edge of a Crosstab with members from
the two hierarchy ACTION and TARGET listed in the attachment.

Thx so much,
Title: Re: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: MFGF on 11 Aug 2014 11:47:28 AM
Quote from: gosoccer on 11 Aug 2014 11:26:29 AM
yes,

all I need to do is to create the Data Item or any other way to populate the Edge of a Crosstab with members from
the two hierarchy ACTION and TARGET listed in the attachment.

Thx so much,

Hi,

Are we over-thinking this? Couldn't you just drag in the ACTION members to the crosstab rows, then stack the TARGET members below them?

MF.
Title: Re: One Data Item to Include Members from two Seperate Heirarchy in Report 10.1.2 OL
Post by: gosoccer on 11 Aug 2014 01:05:44 PM
I can stack the TARGET members below ACTION but unfortunately, I haven't find a way to Sort the listing associated
to both. Thank you