Page 1 of 1
Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 12:36 am
by jimicron
Hi all,
I'm beginning to worry

if I can do this
I have a dimension that has part numbers. I then have a plethora of attributes. One of the attributes is at a higher 'grain'. I created a dimension from this particular attribute in the part number dimension.
Now, I want to populate what attributes I can for my new dimension. I wish I could provide a visual (haven't figured out how to do that yet in the forum).
Part Number (lowest grain).....
Rollup..........
DID.....
Series
M456456..........................C40_C400.....C40.....C400
M458302..........................C40_C400.....C40.....C400
M452329..........................C20_C400.....C20.....C200
So, I created a dimension from the "Rollup" attribute. I now want to populate that dimension with the "DID" and "Series" attributes. So, look at "Rollup" and then give me "DID"
But, can I look at one attribute and give me yet another attribute like that? I am not seeing it online and have been struggling with it
Thanks for any guidance!!!
Re: Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 3:04 am
by tomok
ATTRS('PartNumber',ELCOMP('Rollup',!Rollup,1),'DID');
Re: Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 4:30 pm
by jimicron
Thanks Tomok. I am glad to see that it may be possible.. However, it's not working

I tried various things... including looking up ELCOMP in the manual (but as I think we all know, IBM isn't the greatest at documenting/explaining).
Here is my real code (I was just trying to keep it simple above):
['SSD Model'] = S: ATTRS('SSD MPN', ELCOMP('SSD Description', !SSD Description, 1), 'SSD Model');
'SSD Model' is the name of the column I am trying to populate in my dimension (it's an attribute of the new dimension)
'SSD MPN' is the dimension that I am pulling from which also has 'SSD Model' as an attribute
'SSD Description' is the name of the new dimension that I am trying to populate (but is also the name of an attribute of my 'SSD MPN' dimension) - but based off of this column, I want many other attributes also from 'SSD MPN' (not just 'SSD Model').
I am not thrown an error and in the {ElementAttributes_SSD Description cube, the "SSD Model" column is showing gray... but it's not populating.
It seems like I have done it just like you mentioned? OR is there a subtlty that I am missing? Thanks again!
Re: Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 4:32 pm
by jimicron
Oh.. to add.. just to make sure it's understood... is that since I am pulling it in at a higher grain... it's a many to one... but the "many's" are all the same... hope that makes sense.

Re: Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 5:29 pm
by tomok
if you are going to ask for help, please provide WHAT YOU ARE ACTUALLY DOING! Simplifications, for brevity sake, do not work. Given the facts in this case, the solution I provided will not work. I was led to believe you had a PartNumber dimension that included a hierarchy that rolled the part number to Rollup to DID then Series. That's why I suggested looking at the child of Rollup, which would be part number, and then you could pull in the attributes. This the only way you are going to be able to accomplish what you want. You have to have a path from SSD Description back to SSD MPN and the most logical way is a hierarchy built off SSD MPN that goes all the way up the tree, so that you can use the parent/child relationships to do the lookups.
Re: Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 7:46 pm
by jimicron
My apologies. I was trying to be discrete on the example b/c of sensitive data, etc. However, I have (hopefully I did this right) uploaded an image that shows the cube that currently exists, a sample of the columns (attributes) and then what I want (need). I think this image will explain everything and leave no more wondering

Again, my apologies. Didn't mean to make it difficult - was just trying to be discrete. Thanks a lot!
Re: Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 8:15 pm
by tomok
Assuming you are wanting to populate the attributes in the SSD Description dimension via rules, based on the existing attributes in the SSD MPN dimension you are out of luck. The only way to reference those attributes is with the elements from SSD MPN. Since SSD MPN is not in the attribute cube for SSD Description you can't use it in the rule. The SSD Description attribute of the SSD MPN dimension is just a value, it is not indexable or referenceable. There is no function in TM1 where given an attribute value you can determine the element (except of course for aliases which won't work in this case). You could populate a new attribute for the SSD Description dimension called SSD MPN and use that to reference the attribute values from the SSD MPM attribute cube.
Re: Populate Dimension Attributes at different 'grain'
Posted: Tue Mar 12, 2013 8:34 pm
by jimicron
Thanks Tomok,
You are correct. I AM trying to populate the attributes in the 'SSD Description' dimension via rules looking to the 'SSD MPN' cube.
I know this is a bit redundant and I won't go into the detail as to why I am doing this... but... but just in case it makes a difference... My "SSD MPN" dimension has all the same attributes as what is in my cube. I have a rule that populates the attributes of 'SSD MPN' by looking at the cube. I did this because the end user has an 'override' option so if they do override, I want what they override with to then update the attributes of the dimension b/c that dimension has a lot of alternate hierarchies created automatically based on the attributes.
This is also the reason why i wanted to populate my "SSD Description" cube automatically with rules... b/c then, if they update (override) in the cube... then they would only have to do that override in one place and not also in the new cube. The new cube (dimension) since I was going to use rules would capture their changes.
Bummer. Bummer. Bummer.
But, I will try the other.. but not sure if it will work b/c what if they do the override on the MPN that isn't the one I am using in the "SSD Description" cube... since it's many to one...
Huge bummer. My moving forward was dependent on this working
Thanks again!