Hi,
I was wondering is there a better way to link an attribute value of a source dimension member to a member of another dimension (e.g. personnel cube has a dimension "personnel", which has an attribute called department. Personnel cube doesn't have an Entity dimension. In the SalaryPlanning cube I have to link the salary of each person to an Entity dimension member where the person belongs to.)? My current solution uses DIMIX as a function. However, it seems that after every deletion of a member in the target dimension (or even restructuring the target dimension, e.g. adding a new consolidated member), TM1 reshuffles the indexes and as a result the formula gives me RULE LINE ERROR. After regenerating the formula I get the data back but it doesn't seem like a working solution to me.
So, in order not to reinvent the wheel, maybe somebody has already worked out a solution for it and could help me out.
Thanks,
Jaan
Linking attribute values to a dimension member without DIMIX
- Harvey
- Community Contributor
- Posts: 236
- Joined: Mon Aug 04, 2008 4:43 am
- OLAP Product: PA, TM1, CX, Palo
- Version: TM1 8.3 onwards
- Excel Version: 2003 onwards
- Contact:
Re: Linking attribute values to a dimension member without D
I'm having trouble understanding your question. Could you post the rule and a screenshot of the dimensions in question in line with the Request for Assistance Guidelines ?
Generally speaking, if you're just talking about storing the associated Entity element for each Employee, it's common practice to store the element name in a string attribute, and then refer to that in your rules.
It's really best practice to avoid using element indexes at all, unless you can be totally certain the dimension won't be edited.
Generally speaking, if you're just talking about storing the associated Entity element for each Employee, it's common practice to store the element name in a string attribute, and then refer to that in your rules.
It's really best practice to avoid using element indexes at all, unless you can be totally certain the dimension won't be edited.
Take your TM1 experience to the next level - TM1Innovators.net
-
- Posts: 5
- Joined: Wed Jan 23, 2013 3:05 pm
- OLAP Product: TM1, MS Analyses Services
- Version: 10.1
- Excel Version: Office2010
Re: Linking attribute values to a dimension member without D
Well, to scale it down to the problem, let's assume the situation is in principle as follows:
Let's say I have a Personnel cube, which consists of 3 dimensions: Personnel, SalaryMeasures and Time.
Personnel dimension has an attribute called Department, which is of string type.
Personnel dimension members and their corresponding attribute values:
John Smith - AccountingDepartment
Bob Brown - HRDepartment
Susan Snow - AccountingDepartment
Personnel cube has the following values:
SalaryMeasure = "Salary"
Jan Feb
John Smith 1000 1000
Bob Brown 1200 1200
Susan Snow 1300 1300
Now, SalaryPlanning cube has also 3 dimensions - Entity, SalaryMeasures and Time
Entity dimension has the following members:
AccountingDepartment
HRDepartment
The SalaryPlanning cube should have the following values:
SalaryMeasure = "Salary"
Jan Feb
AccountingDepartment 2300 2300
HRDepartment 1200 1200
The code I was using is as follows
[] = S:IF(DIMIX('Entity', !Entity) <> DIMIX('Entity', ATTRS('PersonnelData',
!PersonnelData, 'Department')), CONTINUE, DB('SalaryPlanning',
!PersonnelData, !Time, !Version, !SalaryPlanningMeasures));
[] = N:IF(DIMIX('Entity', !Entity) <> DIMIX('Entity', ATTRS('PersonnelData',
!PersonnelData, 'Department')), CONTINUE, DB('SalaryPlanning',
!PersonnelData, !Time, !Version, !SalaryPlanningMeasures));
As you can see the rule doesn't match one-to-one the situation described, but I hope you get the idea.
TM1 version is 10.1.
Let's say I have a Personnel cube, which consists of 3 dimensions: Personnel, SalaryMeasures and Time.
Personnel dimension has an attribute called Department, which is of string type.
Personnel dimension members and their corresponding attribute values:
John Smith - AccountingDepartment
Bob Brown - HRDepartment
Susan Snow - AccountingDepartment
Personnel cube has the following values:
SalaryMeasure = "Salary"
Jan Feb
John Smith 1000 1000
Bob Brown 1200 1200
Susan Snow 1300 1300
Now, SalaryPlanning cube has also 3 dimensions - Entity, SalaryMeasures and Time
Entity dimension has the following members:
AccountingDepartment
HRDepartment
The SalaryPlanning cube should have the following values:
SalaryMeasure = "Salary"
Jan Feb
AccountingDepartment 2300 2300
HRDepartment 1200 1200
The code I was using is as follows
[] = S:IF(DIMIX('Entity', !Entity) <> DIMIX('Entity', ATTRS('PersonnelData',
!PersonnelData, 'Department')), CONTINUE, DB('SalaryPlanning',
!PersonnelData, !Time, !Version, !SalaryPlanningMeasures));
[] = N:IF(DIMIX('Entity', !Entity) <> DIMIX('Entity', ATTRS('PersonnelData',
!PersonnelData, 'Department')), CONTINUE, DB('SalaryPlanning',
!PersonnelData, !Time, !Version, !SalaryPlanningMeasures));
As you can see the rule doesn't match one-to-one the situation described, but I hope you get the idea.
TM1 version is 10.1.
-
- 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: Linking attribute values to a dimension member without D
Why would you compare index numbers? Just compare to the actual Entity element itself:
Code: Select all
[] = S:IF(!Entity@<>, ATTRS('PersonnelData',!PersonnelData, 'Department')), CONTINUE, DB('SalaryPlanning',
!PersonnelData, !Time, !Version, !SalaryPlanningMeasures));
-
- Posts: 5
- Joined: Wed Jan 23, 2013 3:05 pm
- OLAP Product: TM1, MS Analyses Services
- Version: 10.1
- Excel Version: Office2010
Re: Linking attribute values to a dimension member without D
Thanks!
This seems to work. How simple!
This seems to work. How simple!