Description:
This function returns the number of parents of member in dimension. This function is designed specifically to allow you to count the number of parent level members in a specified dimension that you wish to access from a database. The function takes two parameters which are the name of the dimension which has the parent level members you wish to count and the name of the child level member whose parent /parents are to be counted. The function will display the count of parents for the specified child member.
Syntax: PARENTCOUNT (dimension, member)
Remarks
Example
=PARENTCOUNT ("Time", "Period_01") |
-returns the number of parent level members from the given dimension, over the given child member (3) |
=PARENTCOUNT("Version", "Forecast") |
-returns the number of parent level members from the given dimension, over the given child member (1) |
=PARENTCOUNT ("Region", "London") |
-returns the number of parent level members from the given dimension, over the given child member (3) |
Let us take the example of a cube in PowerOLAP which requires data that is the value for the count of parent members for a child member, accessed through the name of the child member and dimension name, both of which are the 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 PARENTCOUNT value for the current cube then it is appropriate to use the PARENTCOUNT 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 members 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 member of a different dimension in a different cube.
The screen above shows the formula for the PARENTCOUNT function. The formulas write values into the "MetaDataValues" dimension, to the "ParentCount" member. In the formula, the PARENTCOUNT function takes two parameters, which are the name of the dimension and the name of the child level member. The member count is automatically accessed from the current cube in which the formula is written. The count of parent level members from the specified dimension over the specified detail level member is returned as the result of the function. This function returns the count of the parent level members for the detail member "Period_03" which belongs to the dimension name called "Time (Periods)". This formula returns a count totaling "3".