Trying to display same value as parent in attribute cube of a dimension

Post Reply
Firefly007
Posts: 25
Joined: Tue Feb 26, 2013 12:51 am
OLAP Product: PA,PAW
Version: PA 2.0, PAW(2059)
Excel Version: Excel 2010

Trying to display same value as parent in attribute cube of a dimension

Post by Firefly007 »

Hi All,


I am trying to display same value as parent in attribute cube of a dimension. Currently i can display for all children using the below rule.

['Flag'] =S: IF(ELLEV('TEXT',!Text)=0,'Current',Continue);

What i am trying to do is to display only when consolidation is not blank .If I have multiple individual unique hierarchy's Can we do it dynamically?


Regards,
Attachments
Hierarchy.JPG
Hierarchy.JPG (15.48 KiB) Viewed 5261 times
Wim Gielis
MVP
Posts: 3230
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Trying to display same value as parent in attribute cube of a dimension

Post by Wim Gielis »

Hello,

Why don't you update the }ElementAttributes_Text cube with Turbo Integrator ?
Can the dimension structures be changed by users ?

Can a lowest-level element in the dimension Text have multiple (immediate) parents ?
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Trying to display same value as parent in attribute cube of a dimension

Post by jim wood »

Try:

Code: Select all

['Flag'] = S: IF(Ellev('Text',!Text)=0
                     ,IF(DB('}ElementAttributes_Text',ElPar('Text',!Text,1),'Flag')@<>''
                          ,DB('}ElementAttributes_Text',ElPar('Text',!Text,1),'Flag')
                          ,STET
                         )
                     ,STET
                    );
This assumes that each child only has one parent or will assume the value of the first parent. You can always check the number of parents if you want this to differ.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Trying to display same value as parent in attribute cube of a dimension

Post by jim wood »

Wim Gielis wrote:Hello,

Why don't you update the }ElementAttributes_Text cube with Turbo Integrator ?
Can the dimension structures be changed by users ?

Can a lowest-level element in the dimension Text have multiple (immediate) parents ?
Not sure why you'd do this with TI. It would mean every time the attribute changes you'd need to run it. For one text attribute this seems over kill when a simple rule will do it.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Firefly007
Posts: 25
Joined: Tue Feb 26, 2013 12:51 am
OLAP Product: PA,PAW
Version: PA 2.0, PAW(2059)
Excel Version: Excel 2010

Re: Trying to display same value as parent in attribute cube of a dimension

Post by Firefly007 »

Thank you Jim,

This approach helps me to calculate further rules in a different cube.I agree TI process would be long process to make other depended rules get calculated.

-Regards
Wim Gielis
MVP
Posts: 3230
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Trying to display same value as parent in attribute cube of a dimension

Post by Wim Gielis »

jim wood wrote:
Wim Gielis wrote:Hello,

Why don't you update the }ElementAttributes_Text cube with Turbo Integrator ?
Can the dimension structures be changed by users ?

Can a lowest-level element in the dimension Text have multiple (immediate) parents ?
Not sure why you'd do this with TI. It would mean every time the attribute changes you'd need to run it. For one text attribute this seems over kill when a simple rule will do it.
You're right, a simple rule will do.
In case there would be multiple parents, we might think of using TI to store the parent in a text attribute,
and then picking up that parent name in a rule like yours.
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Trying to display same value as parent in attribute cube of a dimension

Post by tomok »

jim wood wrote:Not sure why you'd do this with TI.
Because you might not get the value you want in the attribute if you have multiple hierarchies in the dimension , which the OP said he had. You have to hard code a parent number in the rule so it would be imperative that you maintain STRICT control over the dimension. The best way to control it would be to make the tree we are talking about be the first tree in the dimension and ALL elements need to be in that tree. This would ensure that parent number 1 for each of the elements would be the parent you need the attribute value for. If you can't do this, for whatever reason, the best approach would be a TI since with a TI you could walk your way through a tree and set the values accordingly, without worrying about which parent number an element has.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Trying to display same value as parent in attribute cube of a dimension

Post by jim wood »

tomok wrote:
jim wood wrote:Not sure why you'd do this with TI.
Because you might not get the value you want in the attribute if you have multiple hierarchies in the dimension , which the OP said he had. You have to hard code a parent number in the rule so it would be imperative that you maintain STRICT control over the dimension. The best way to control it would be to make the tree we are talking about be the first tree in the dimension and ALL elements need to be in that tree. This would ensure that parent number 1 for each of the elements would be the parent you need the attribute value for. If you can't do this, for whatever reason, the best approach would be a TI since with a TI you could walk your way through a tree and set the values accordingly, without worrying about which parent number an element has.
That's why I mentioned the number of parents. If you expand it with a couple of IF statements you can spool through the number of parents. Granted a WHILE in TI is neater from a pure coding point of view, and that you'd be limited within the rule to hard stop number of parents, it would still be dynamic and not restricted in the same way as TI. As every parent needs a value, no feeder is required, so even if you put 10 if statements in there the overhead would minimal.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Post Reply