Hierarchies and element attributes

Post Reply
User avatar
PavoGa
MVP
Posts: 616
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

Hierarchies and element attributes

Post by PavoGa »

It seems another issue has popped up where the hierarchy functionality is long on promise and wee bit short on delivery.

I thought that ElementAttrInsert would generate an attribute that is managed/stored by hierarchy. For instance, say an attribute is created in dimname:hiername1 for Element X, I want the attribute value to be 1, but in dimname:hiername2, I want that value to be 2 for Element X. This functionality seems implied as the function ElementAttrPutN requires a specific hierarchy to be named for each call.

However, that does not seem to be the way it is. For example:

Code: Select all

dimOrg = 'Organization';
hier1 = '2018 East';
hier2 = '2019 East';

ElementAttrPutN(2, dimOrg, hier1, 'Alabama', 'TheRealValue');
ElementAttrPutN(106, dimOrg, hier2, 'Alabama', 'TheRealValue');

results in 106 being the value across both hierarchies. Is there some setting that causes that or is that the way it is supposed to be? Am I over the rainbow here with thinking that functionality is implied because I sure have not read anything explains how this is supposed to work either way.
Ty
Cleveland, TN
User avatar
Steve Rowe
Site Admin
Posts: 2410
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Hierarchies and element attributes

Post by Steve Rowe »

When I was doing my detailed testing I'm pretty sure I got to the same place.

Attributes appear to be old style objects that can't be varied by hierarchy. It would appear that IBM just created all the hierarchy equivalent TI functions without considering if the objects they addressed would exist / work.
No idea what IBMs plan is here or why it is going wrong.

Obviously you can build your own cube as a workaround...
Technical Director
www.infocat.co.uk
User avatar
PavoGa
MVP
Posts: 616
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: Hierarchies and element attributes

Post by PavoGa »

Steve Rowe wrote: Tue Oct 30, 2018 12:06 pm Obviously you can build your own cube as a workaround...
And that is pretty much the conclusion we reached as well, although we may consider adding attributes in the form of hiername_TheRealValue. We can easily enough, I think, handle that construction instead propagating numerous cubes to manage attributes by hierarchy.

Thanks for confirming, Steve. I was hoping for some obscure setting in the config file or undocumented "feature" that got around this.
Ty
Cleveland, TN
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Hierarchies and element attributes

Post by paulsimon »

Hi

Just to confirm - I tried an experiment. I created an extra ByWD hierarchy on the model dimension in SDATA and built a hierarchy according to whether the description had 2WD, 4WD or something else. I then created an Attribute 'Wheels' using ElementAttrInsert, which requires a Hierarchy parameter. On the Data tab I set the value of the Wheels attribute using ElementAttrPutS( NumberToString( vWheels) , vDim , vWDHier ,vModel , 'Wheels' ) ;

However, the end result was that the }ElementAttributes_model cube got updated with both the Wheels Attribute and its values, so effectively ElementAttrInsert is no different to AttrInsert and ElementAttrPutS is no different to AttrPutS. In other words the additional Hierarchy parameter to these functions is completely ignored.

I looked at the underlying folder for model}hiers just in case something had been created there was wasn't showing up in Perspectives but nothing was.

If it helps you, the noddy process that I used to prove this is attached. It might be easier to send this across to IBM rather than anything based on your model, since they must already have the SDATA sample cubes.

Regards

Paul Simon
Attachments
Upd Dim Model Add WD Hier.pro
(2.38 KiB) Downloaded 191 times
User avatar
PavoGa
MVP
Posts: 616
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: Hierarchies and element attributes

Post by PavoGa »

Just noticed I failed to say thank you. Much appreciated, Paul.
Ty
Cleveland, TN
Post Reply