Hi Folks,
I am trying to pull values from one cube to another. Here is the scenario.
I have two cubes one is the main cube named 'All Expense' having these dimensions
Function
Department
Central Nature
Scenario
Facility
Year
Months
Expense Measures
I am pulling values from an other cube named as 'Long term disability Insurance' having the dimensions listed below into the 'All Expense' cube
Function,
Facility
Year
Scenario
Employee(Attributes:Facility(text),Department(Text)).
Employee Insurance Measure
Now the department resides in the attribute of the employee dimension and i want to pull the details of only the departments pertaining to the employee.
This piece of code works fine but I am not sure if it will give me the results as expected.
['Amount LC']=N:DB('Long Term Disability Insurance',!Function,!Facility,!Year,'Budgeted',!Department,'Employer Premium LC');
I get error when i try to do something like this.
['Amount LC']=N:DB('Long Term Disability Insurance',!Function,!Facility,!Year,'Budgeted',ATTRS('Employee',!Employee,'Department'),'Employer Premium LC');
Really confused as to how to retrieve the values in such cases or do I have to put another dimension in the 'Long Term Disability Insurance cube'?
I Request someone to kindly help me in this regards.
Thanks,
Ravi Ahuja.
Pulling values from other cubes using rules.
-
- Posts: 33
- Joined: Tue Aug 30, 2011 8:34 am
- OLAP Product: TM1
- Version: 9.5
- Excel Version: 10.0
- jim wood
- Site Admin
- Posts: 3961
- 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: Pulling values from other cubes using rules.
Employee as a dimension only exists in the cube that you are getting data from. You can only get attributes from dimensions for the cube that rule is attached to. That's your problem.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Pulling values from other cubes using rules.
The easiest solution would be to create new consolidations in the Employee dimension, grouping Employees into the same departments that are then used in the Department dimension in the second cube. Your first rule would then work nicely and there would be no need to use attributes either.
And you can't really use attributes of the Employee dimension in that way, because !Employee will not be resolved properly in the context of the target cube as it does not have that dimension.
And you can't really use attributes of the Employee dimension in that way, because !Employee will not be resolved properly in the context of the target cube as it does not have that dimension.
Kamil Arendt
- jim wood
- Site Admin
- Posts: 3961
- 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: Pulling values from other cubes using rules.
Is it me or did I just say that??? Probably me.qml wrote:And you can't really use attributes of the Employee dimension in that way, because !Employee will not be resolved properly in the context of the target cube as it does not have that dimension.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- Posts: 33
- Joined: Tue Aug 30, 2011 8:34 am
- OLAP Product: TM1
- Version: 9.5
- Excel Version: 10.0
Re: Pulling values from other cubes using rules.
still it will not be dynamic as i want, because if i create a consolidation for department it would be something like this.
['Amount LC','<A department code>']=N:DB('Long Term Disability Insurance',!Function,!Facility,!Year,'Budgeted','<A department code>','Employer Premium LC');
I will have to hard code this which i want to avoid because I have a big list of departments.
Likewise is the case with the Chart of accounts which gets stored in the respective employee attribute. Is there a way around for this?
['Amount LC','<A department code>']=N:DB('Long Term Disability Insurance',!Function,!Facility,!Year,'Budgeted','<A department code>','Employer Premium LC');
I will have to hard code this which i want to avoid because I have a big list of departments.
Likewise is the case with the Chart of accounts which gets stored in the respective employee attribute. Is there a way around for this?
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Pulling values from other cubes using rules.
No, you won't. There are ways of keeping the rule generic, for example create an attribute for Department (and set its value to something for those Departments that you want to pull data from the other cube) and then check on the right hand side of that rule using an IF statement if a given Department has that attribute set to something. If yes, calculate rule, if not, stet or whatever.ravi.ahuja21 wrote:I will have to hard code this which i want to avoid because I have a big list of departments.
Am I not allowed to have the same opinion?jim wood wrote:Is it me or did I just say that??? Probably me.


Kamil Arendt
- jim wood
- Site Admin
- Posts: 3961
- 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: Pulling values from other cubes using rules.
Of course you're allowed. Sometimes my mind and fingers disconnect so what I mean to say doesn't actually come out the way I mean to say it. I have to check these things sometimes.qml wrote:Am I not allowed to have the same opinion?Especially if it's the right opinion?
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7