Can MDX work across alt hierarchies from one dim?

Post Reply
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Can MDX work across alt hierarchies from one dim?

Post by macsir »

Looks like it gives me incompatible dimensionality error. Could anyone help to confirm? Thanks.
e.g. Union( [dim].[a].children, [dim].[c].children )
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
Wim Gielis
MVP
Posts: 3121
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Can MDX work across alt hierarchies from one dim?

Post by Wim Gielis »

That’s indeed incompatible. Are you not trying to make an MDX view using those 2 sets of elements (the ones that are shared) ?
Last edited by Wim Gielis on Tue Apr 23, 2024 9:18 am, edited 1 time in total.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3657
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Can MDX work across alt hierarchies from one dim?

Post by lotsaram »

macsir wrote: Tue Apr 23, 2024 6:01 am Looks like it gives me incompatible dimensionality error. Could anyone help to confirm? Thanks.
e.g. Union( [dim].[a].children, [dim].[c].children )
This can't work by definition. The hierarchies are separate entities. No C elements are shared.

You could use Generate to loop a set on one hierarchy and return the set of leaves (or even the set of C elements sharing the same name) existing in the other hierarchy.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: Can MDX work across alt hierarchies from one dim?

Post by macsir »

Wim Gielis wrote: Tue Apr 23, 2024 6:44 am That’s indeed incompatible. Are you not trying to make an MDX view using those 2 sets of elements (the ones that are shared) ?
No, just want to see if it is possible in a MDX set.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: Can MDX work across alt hierarchies from one dim?

Post by macsir »

lotsaram wrote: Tue Apr 23, 2024 7:16 am
macsir wrote: Tue Apr 23, 2024 6:01 am Looks like it gives me incompatible dimensionality error. Could anyone help to confirm? Thanks.
e.g. Union( [dim].[a].children, [dim].[c].children )
This can't work by definition. The hierarchies are separate entities. No C elements are shared.

You could use Generate to loop a set on one hierarchy and return the set of leaves (or even the set of C elements sharing the same name) existing in the other hierarchy.
Haven't used Generate function a lot but good to know.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
Wim Gielis
MVP
Posts: 3121
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Can MDX work across alt hierarchies from one dim?

Post by Wim Gielis »

macsir wrote: Tue Apr 23, 2024 10:31 am
Wim Gielis wrote: Tue Apr 23, 2024 6:44 am That’s indeed incompatible. Are you not trying to make an MDX view using those 2 sets of elements (the ones that are shared) ?
No, just want to see if it is possible in a MDX set.
Then the answer is no, as what Lotsa also replied.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
ardi
Community Contributor
Posts: 152
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Can MDX work across alt hierarchies from one dim?

Post by ardi »

macsir wrote: Tue Apr 23, 2024 6:01 am Looks like it gives me incompatible dimensionality error. Could anyone help to confirm? Thanks.
e.g. Union( [dim].[a].children, [dim].[c].children )
Not possible, different hierarchies of a dimension are treated the same as 2 separate dimensions.
Ardian Alikaj
Post Reply