I am working in 10.2 Architect trying to create a TI process to update my account dimension. The current structure has Assets, Liabilities, and Net Profit rolling up to the top level of the hierarchy Total. My users have requested an alternative hierarchy that only includes balance sheet activity. So Assets and Liabilities would net to zero at the Total level or top level. Current the dimension is created by the line below.
DimensionElementInsert('Account','',Level1,'N');
The issue I am running into is that I would like to change the weight of Level 1 to a negative. This way I can keep Assets and Liabilities as positive number and have them net to zero at the Total or top level. In the past I have used the code below to manipulate the weight of a element however since there is not parent the ti process is erroring. I also tried to leave the parent blank however the process errors telling me it could not find the a blank parent.
DimensionElementComponentDelete ( sDim, sParent, sChild );
DimensionElementComponentAdd ( sDim, sParent, sChild, -1 );
Anyone have an idea how to manipulate the weight of an element at the top level in a TI process? Thanks everyone.
TI Change Weight Of Top Level In Hierarchy
-
- Posts: 31
- Joined: Thu Apr 25, 2013 1:36 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2007
-
- Community Contributor
- Posts: 128
- Joined: Wed Oct 14, 2009 7:46 am
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 11
- Location: London
Re: TI Change Weight Of Top Level In Hierarchy
Hi,
Not sure if I fully understand your question but top level consolidations do not have weightings. Children of consolidations have weightings, dictating the way they are aggregated into the consolidation above. If you wanted to keep both assets and liabilities positive, you should change the weighting of liabilities to -1 so it is subtracted from assets at the level above.
Dan
Not sure if I fully understand your question but top level consolidations do not have weightings. Children of consolidations have weightings, dictating the way they are aggregated into the consolidation above. If you wanted to keep both assets and liabilities positive, you should change the weighting of liabilities to -1 so it is subtracted from assets at the level above.
Dan
-
- Posts: 31
- Joined: Thu Apr 25, 2013 1:36 pm
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2007
Re: TI Change Weight Of Top Level In Hierarchy
Hierarchy
Total
Assets
Liabilities & Equity
Net Profit
I can adjust the weight of these consolidated levels by opening the dimension editor right click and go to element properties. The Dimension Element Properties screen allows me to adjsut the weight at the top or consolidated level.
I am trying to find a way in a ti process that when it creates the 'Total' level element it creates it with a weighting of -1. The ti code I use is:
DimensionElementInsert('Account','',Level1,'N');
However when inserting this level DimensionElementInsert does not allow me to adjust the weight of these elements. I have tried to add:
DimensionElementComponentAdd ('Account','',Level1, -1 );
An error returns telling me I must identify a parent to use this funcion however I have no level above 'Total'. I could be explaining this poorly. Just looking for a way to change this weight at the top or consolidated level.
Thanks!
Total
Assets
Liabilities & Equity
Net Profit
I can adjust the weight of these consolidated levels by opening the dimension editor right click and go to element properties. The Dimension Element Properties screen allows me to adjsut the weight at the top or consolidated level.
I am trying to find a way in a ti process that when it creates the 'Total' level element it creates it with a weighting of -1. The ti code I use is:
DimensionElementInsert('Account','',Level1,'N');
However when inserting this level DimensionElementInsert does not allow me to adjust the weight of these elements. I have tried to add:
DimensionElementComponentAdd ('Account','',Level1, -1 );
An error returns telling me I must identify a parent to use this funcion however I have no level above 'Total'. I could be explaining this poorly. Just looking for a way to change this weight at the top or consolidated level.
Thanks!
-
- 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: TI Change Weight Of Top Level In Hierarchy
What Dan told you is correct, regardless of what you want to believe. You can only change the weighting of an element that is a child of a consolidation. Note that I said "Child", not "Leaf". The weighting property controls how that particular child rolls up to it's immediate parent, regardless of whether that child is also a parent of another consolidation or just a plain leaf. You can change the weighting of Assets and Liabilities & Equity because they both roll to Total. Putting a weighting of -1 on Liabilities & Equity does not make the node Liabilities & Equity be negative by itself, it only means make it negative when calculating Total.
-
- Community Contributor
- Posts: 128
- Joined: Wed Oct 14, 2009 7:46 am
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 11
- Location: London
Re: TI Change Weight Of Top Level In Hierarchy
If you have a consolidation 'Total' and you want to add 'Liabilities' to it with a weighting of -1, the following line of code should do the trick:
DimensionElementComponentAdd('Account', 'Total', 'Liabilities', -1);
You can refer to the online reference guide here for more information.
DimensionElementComponentAdd('Account', 'Total', 'Liabilities', -1);
You can refer to the online reference guide here for more information.
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: TI Change Weight Of Top Level In Hierarchy
Exception is if Liabilities is already a child of Total then DimensionElementComponentAdd won't change the weighting. The only way to change the weighting via code of a member of a consolidation is to first DELETE the element from the consolidation with DimensionElementComponentDelete and then add it back with the correct weighting.dan.kelleher wrote:If you have a consolidation 'Total' and you want to add 'Liabilities' to it with a weighting of -1, the following line of code should do the trick:
DimensionElementComponentAdd('Account', 'Total', 'Liabilities', -1);
You can refer to the online reference guide here for more information.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.