Page 1 of 1
Help for TM1RptElLev function
Posted: Fri May 22, 2009 6:26 am
by kennyyeung
I am trying to format the active form based on the level of consolidation element. (i.e. a color for each level )
( e.g. level 0 :red, level 2 green & level 3 blue)
I found that TM1RptElLev function could be helpful , but it's lack of example in the developer guide.
Is there any example for reference?
Re: Help for TM1RptElLev function
Posted: Sat May 23, 2009 3:54 am
by lotsaram
TM1RPTELLEV is a new function with 9.4 that relates specifically to elements in the subset being used in an active form as opposed to the dimension itself. Specifically this function returns the number of levels between the "root" or top node of the subset and the element being tested.
The result returned is therefore relative to the set of elements in the subset not the whole dimension and it is also kind of the inverse of the TM1 dimension level concept. That is if the subset root is level 5 then a level 4 element would return 1, a level 3 element would return 2, etc.
If you want your formatting in the active form to be absolute with reference to the dimension level of each element then all that is required is to change the formula in the hidden column A to use ELLEV instead (or you could define a formatting attribute and use DBRA). You will also need to change the format look up identifiers in A2:A7 (you can also expand the format range, you are not limited to just 6 formats.)