Page 1 of 1
TI Change Weight Of Top Level In Hierarchy
Posted: Tue Mar 25, 2014 12:44 pm
by tgaluskapatterson
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.
Re: TI Change Weight Of Top Level In Hierarchy
Posted: Tue Mar 25, 2014 2:33 pm
by dan.kelleher
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
Re: TI Change Weight Of Top Level In Hierarchy
Posted: Tue Mar 25, 2014 3:58 pm
by tgaluskapatterson
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!
Re: TI Change Weight Of Top Level In Hierarchy
Posted: Tue Mar 25, 2014 5:34 pm
by tomok
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.
Re: TI Change Weight Of Top Level In Hierarchy
Posted: Wed Mar 26, 2014 12:26 pm
by dan.kelleher
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.
Re: TI Change Weight Of Top Level In Hierarchy
Posted: Wed Mar 26, 2014 2:25 pm
by lotsaram
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.
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.