Description:
This function returns the name of the indexed child of a specified member in a specified dimension. This function is designed specifically to allow you to view the child level members under a specific aggregate member. The function displays the name of the member at the specified index under the specified parent member. The function takes as a parameter the name of the dimension which has the childlevel member, the name of the member whose child level member you wish to access and the index of that child.
Syntax: CHILD (Dimension, Member, Index)
Remarks
Example
=CHILD ("Region","All Regions",2) |
-returns the 2nd child of the member "All Regions" from the dimension Region (Member : " Europe") |
=CHILD ("Version","Variances", 3) |
-returns the 3rd child of the member "Variances" from the dimension Version (Member: "VariaceActualVsForecast") |
Let us take the example of a cube in PowerOLAP which requires data that is the value for the name of a child member which is accessed through its index number and the dimension as well as the member name, all of which are to be given as a parameter to the function. If in the same dimension in another member or in another dimension in another cube, you want to display this accessed CHILD member value for the index supplied to the function then it is appropriate to use the CHILD function to access the member name at a given index. In this case we can write a formula in the cube in PowerOLAP to access this value for an index number with the help of this function and write this value to another member that is supposed to hold this value as fact data or you can also write this value to a different dimension in a different cube.
The screen above shows a formula for the CHILD function. The formula writes a value into the "MetaDataValues" dimension, into the "CHILD" member. In the formula, the CHILD function takes three parameters, which are, the name of the dimension whose members are accessed, the name of the aggregate member from within the dimension specified and the index number for the child whose name has to be returned as the result of the function. This formula accesses the child level member based upon the other two parameters that are given and then depending upon the index of the child level member the resultant value is returned by the function. The function above accesses the members from the "Time (Periods)" dimension, and then accesses the aggregate member "Qtr_1" and then from that it accesses the 3rd child of the indicated aggregate, the 3rd child in this case being "Period_03" and is the value returned.