Hello Guys,
I have a dimension with multiple hierarchies. There is a n level element which has more than one parent in the different hierarchies of the dimension.
Is there a quick way / mdx to find out all the parents for a particular n level element of the dimension.
Thanks,
Girish
All Parents for n level element
-
- Regular Participant
- Posts: 424
- Joined: Sat Mar 10, 2012 1:03 pm
- OLAP Product: IBM TM1, Planning Analytics, P
- Version: PAW 2.0.8
- Excel Version: 2019
Re: All Parents for n level element
This might help:
http://users.skynet.be/fa436118/wim/tm1 ... ing_EN.htm Thanks
http://users.skynet.be/fa436118/wim/tm1 ... ing_EN.htm Thanks
"You Never Fail Until You Stop Trying......"
-
- Posts: 4
- Joined: Mon Nov 07, 2011 7:13 am
- OLAP Product: Cognos Planning
- Version: 8.4
- Excel Version: 2007
Re: All Parents for n level element
ELPAR function must help you , Set the Dimension view and following code should help you.
v1 is the variable declared in variables TAB
vHierarchy1 = ELPAR('Dimesnion',v1,1);
vHierarchy2 = ELPAR('Dimension',vHierarchy1,1);
vHierarchy3 = ELPAR('Dimension',vHierarchy2,1);
vHierarchy4 = ELPAR('Dimension',vHierarchy3,1);
v1 is the variable declared in variables TAB
vHierarchy1 = ELPAR('Dimesnion',v1,1);
vHierarchy2 = ELPAR('Dimension',vHierarchy1,1);
vHierarchy3 = ELPAR('Dimension',vHierarchy2,1);
vHierarchy4 = ELPAR('Dimension',vHierarchy3,1);
-
- Regular Participant
- Posts: 424
- Joined: Sat Mar 10, 2012 1:03 pm
- OLAP Product: IBM TM1, Planning Analytics, P
- Version: PAW 2.0.8
- Excel Version: 2019
Re: All Parents for n level element
For that matter ,ELPARN is much more relevant to OP and this is what you could see in Wim Gielis post I have shared above ;
Thanks
Code: Select all
ELPARN returns the number of parents of an element in a specified dimension.
Syntax
ELPARN(dimension, element)
"You Never Fail Until You Stop Trying......"
-
- Posts: 14
- Joined: Fri Oct 24, 2008 9:18 am
Re: All Parents for n level element
Thanks BariAbdul