Greetings fellow TM1 developers,
I'm not too experienced with TM1 and I have problem in my model when trying to create a rule that requires mapping attribute to attribute to make it happen. Since TM1 doesnt allow me to do functions to left I havent yet figured how and where to call the Attribute in the cube where Im bringin the data to. At this time I'v tested all kinds of methods like using DB('Cube' ,!dimension1 ,!dimension2, ATTRS('dimension', ATTRS('dimension', !element', 'attribute'), !elements, 'attribute');
I also tried to compare the attributes with IF and it succeeds but in TRUE section I pretty much struggle with same problem, what to call in there to get the data i need. There are 4 matching dimensions and 5th one has matching attributes only.
Help is much appreciated. Thanks in advance!
Mapping Attribute to Attribute problem
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: Mapping Attribute to Attribute problem
Could you be more specific about exactly what it is you are trying to achieve.
- Are you trying to pull data from a source based on an attribute of a dimension of the target?
Are you trying to populate only cells in the target for which an attribute has a particular value?
-
- Posts: 16
- Joined: Wed Aug 17, 2011 10:40 am
- OLAP Product: Planning, TM1
- Version: 9.5.1
- Excel Version: 2007
Re: Mapping Attribute to Attribute problem
I have two cubes is this case with other havine next dimensions in Cube1: Company, Year, Month, CustomerID and Measures and other Cube2 is same as this but with Exception in CustomerID that we call CustomerName in this case. They have differently named elements and are used in different cubes for reason. They both have Identificator text attribute that is the same in 98% of the elements.
Lets say CustomerID is 100001 and Customer name is CompanyX. Both dimensions have Identificator attribute that joins them in 0..1 that is lets say for example XYZ10101.
Dimension: Customer ID
Element: 100001
Attribute (Identificator): XYZ10101
Dimension: CustomerName
Element: CompanyX
Attribute (Identificator): ZYZ10101
I need to map these Attributes with rule to pull the data from Cube2 to Cube1. In theory if I could use the attribute as element name in either one of the Dimensions the data would be easy to pull but with Attributes I just dont know how to make the magic happen.
Lets say CustomerID is 100001 and Customer name is CompanyX. Both dimensions have Identificator attribute that joins them in 0..1 that is lets say for example XYZ10101.
Dimension: Customer ID
Element: 100001
Attribute (Identificator): XYZ10101
Dimension: CustomerName
Element: CompanyX
Attribute (Identificator): ZYZ10101
I need to map these Attributes with rule to pull the data from Cube2 to Cube1. In theory if I could use the attribute as element name in either one of the Dimensions the data would be easy to pull but with Attributes I just dont know how to make the magic happen.
Last edited by olapc on Wed Jun 13, 2012 9:41 am, edited 1 time in total.
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: Mapping Attribute to Attribute problem
Is "Identificator" unique in both CustomerId and in CustomerName? What I mean is for any value of "Identificator" is there at most one CustomerId and at most one CustomerName having that value?
-
- Posts: 16
- Joined: Wed Aug 17, 2011 10:40 am
- OLAP Product: Planning, TM1
- Version: 9.5.1
- Excel Version: 2007
Re: Mapping Attribute to Attribute problem
In CustomerID its not unique. Only in CustomerName. This is tricky.
-
- Regular Participant
- Posts: 164
- Joined: Tue May 04, 2010 10:49 am
- OLAP Product: Cognos TM1
- Version: 9.4.1 - 10.1
- Excel Version: 2003 and 2007
Re: Mapping Attribute to Attribute problem
So is there a many to one relationship between CustomerID and CustomerName? That is, one or more CustomerIDs map to a single CustomerName?olapc wrote:In CustomeID its not unique. Only in CustomerName. This is tricky.
If so, might you not be better using a single "Customer" dimension? You could then create consolidations using the customer name and have the relevant customer ids rolling up to it. Then you just have one cube and no need for a rule. If you want to use two cubes and two dimensions, you may want to create these consolidations anyway to provide a way to pull the data across.
-
- Posts: 16
- Joined: Wed Aug 17, 2011 10:40 am
- OLAP Product: Planning, TM1
- Version: 9.5.1
- Excel Version: 2007
Re: Mapping Attribute to Attribute problem
The problem is that in datawarehouse the data is not optimally designed and thats why this is bit special case. Practicly Im trying to correct the errors made there and create a solid model where I can present all the data in one cube. So if there is two same item names they should be consolidated. I dont see how I could make from this datawarehouse a model with TI process as single Customer dimension. It seems impossible. Would be nice if I could just pull the data with rule but I guess there is no simple method to do it over Attribute to Attribute.
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: Mapping Attribute to Attribute problem
If you have to stick to your current cube structure then in CustomerName the attribute "Identificator" needs to be an alias (as suggested by tomok in this similar thread - http://www.tm1forum.com/viewtopic.php?f=3&t=7076).
Then use something a bit like this :-
As it is an alias in CustomerName the Identificator is now used by DIMIX. If DIMIX returns 0 then the Identifcator for the Cube1 cell is not valid in Cube2 and we continue to the next rule statement. If it is valid then it will be recognised by the DB which will pull in the correct value.
Then use something a bit like this :-
Code: Select all
[] = IF( 0 = DIMIX( 'CustomerName', ATTRS('CustomerId', !CustomerId, 'Identificator') )
, CONTINUE
, DB( 'Cube2', !Company, !Year, !Month, ATTRS('CustomerId', !CustomerId, 'Identificator'), !Measures )
);