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: 3185
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: 3685
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: 3185
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: 162
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
User avatar
PavoGa
MVP
Posts: 618
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

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

Post by PavoGa »

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 )
What is it you are trying to accomplish exactly?

Also, the example could be confusing. From the coversation, it is assumed that a and c are separate hierarchies within the same dimension and if so, why is children used? Or are a and c consolidations within the same dimension?

Is it:

UNION( [dim1].[consolidation_a].children, [dim2].[consolidation_c].children) (not possible)

or

UNION( [dim1].[alt_hier_a].[some consol].children, [dim1].[alt_hier_c].[some aconsol].children) (pretty sure not possible either)

or

UNION( [dim1].[consolidation_a].children, [dim1].[consolidation_c].children) (yes possible)

If separate dimensions or hierarchies, you could (maybe) generate an INTERSECTION of the two sets, but not a UNION as mentioned.

NOTE; an intersection could not be created using the INTERSECTION function, but GENERATE and StrToMember nonsense and it would be tricky if possible.
Ty
Cleveland, TN
Post Reply