Description:
This function returns the number of children of member in dimension. This function is designed specifically to allow you to count number of child level members in a specified dimension that you wish to access from a specified database. The function takes two parameters which are the name of the dimension which has the child level members you wish to count and the name of the parent level member whose children are to be counted. The function will display the count of children for the specified parent member.
Syntax: CHILDCOUNT (Dimension, Member)
Remarks
Example
=CHILDCOUNT ("Time", "Qtr_1") |
-returns the number of child level members from the given dimension,under the given parent member (3) |
=CHILDCOUNT ("Version", "Forecast") |
-returns the number of child level members from the given dimension, under the given parent member (5) |
=CHILDCOUNT ("Region", "Asia") |
-returns the number of child level members from the given dimension, under the given parent member (6) |
Let us take the example of a cube in PowerOLAP which requires data that is the value for the count of child members under a parent member, accessed through the aggregate member and dimension name, both of which have to be used as parameters for the function. If in the same dimension in another member or in another dimension in another cube, you want to display this accessed CHILDCOUNT value for the current cube then it is appropriate to use the CHILDCOUNT function to access such a member count. In this case we can write a formula in the cube in PowerOLAP to access this value for the count of dimensions 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 the formula for the CHILDCOUNT function. The formulas write values into the "MetaDataValues" dimension, to the "ChildCount" member. In the formula, the CHILDCOUNT function takes two parameters, which are, the name of the dimension and the name of the aggregate member. The member count is automatically accessed from the current cube in which the formula is written. The count of child level members from the specified dimension under the specified aggregate level member is returned as the result of the function. This function returns the count of the child level members under the aggregate member "All_Periods" which belongs to the dimension name called "Time (Periods)". This formula returns a count totaling "4".