This function returns true if the specified parent
is the parent of the child member in the specified dimension of the
database. This function is designed specifically to allow you to check
if there exists a valid parent -child relationship between two members.
The result of the function is displayed as a Boolean value. If the
parent member that is specified in the function, is the parent of
the child member also specified in the function then the function
returns "True" or else if the member is not the parent of
the member specified as the child, or if there is no relationship
whatsoever between the two members, then the function returns the
value which equals "False".
The function takes as a parameter the name of the
database with the required dimension, the name of the dimension that
has the child and parent level members, the name of the child member
that is being checked for belonging to the specified parent or not,
and the last parameter is the name of the parent member with what
the child member is compared with.
The function has the following syntax:
Syntax: OLAPIsParentOf
(database, dimension, child, parent )
Explained below are the 4 parameters that have to
be provided when building this function.
- Database : Enter the name of the database which
has the dimension and that you want to access / enter the cell
reference which has the name of this Database.
- Dimension : Enter the name of the dimension
which exists in this database mentioned above and is the dimension
within which you want to check the relationship between 2 members
/ alternatively enter the cell reference which has the name of
such a dimension.
- Child : Enter the name of a child level member
for which you want to ensure the relationship with a parent level
member whose name has been specified as the parameter mentioned
below / enter the cell reference which has such a member as its
value.
- Parent : Enter the name of a parent level member
for which you want to ensure the relationship with one or more
child level members whose name you have specified as the previous
parameter / enter the cell reference which has such a member as
its value.
Remarks
- If a connection is not established with a database
the result will be a #value.
- The dimension and in it the member names for
both child and parent, must exist within this database and they
should be referenced by the accurate and exact name.
- The member referenced in the "Child"
parameter should be a child level (detail) member (for accurate
results).
- The member referenced in the "Parent"
parameter should be a parent (aggregate) member having one or
more than one child (for accurate results).
- All arguments are compulsory and neither argument
is optional.
Example
This function may be easier to understand with an
example.
- In order to build this function with more ease,
open the specific database and bring a slice from that database
into Excel. In this way you will have connected to PowerOLAP because
you now have the OLAPOpen formula automatically on your sheet
when you bring a slice of the cube into Excel.
- In Excel, use the menu: Insert -> Function
and select PowerOLAP from the drop down list.
- Choose the OLAPIsParentOf function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name, the dimension name, and the parent level
member name (if it exists on the sheet) as well as the child level
member name. If you don't want to manually enter the member you
can use another function called OLAPMember in order to get this
value and then use that cell as a reference for a formula. For
the dimension too, if it doesn't already exist on your sheet and
you don't want to manually type it in the function, use the OLAPDimension
function to access the dimension name and then refer that cell
in this function.
- In the following example B1 is the cell that
holds the database name, B5 is the name of the dimension that
contains the parent and the child level members. The parent member
is referenced through D8 and the child level member is referenced
through "Period_1".
=OLAPIsParentOf
($B$1, $B$5,"Period_01", D8) |
The above formula returns a value = "False"
which signifies that "Qtr_3" (D8) which is specified as
the parent level member is indeed not the parent of the child level
member "Period_01" which is specified as the child parameter
in the dimension Time (Periods) (B5) in the database "Acuity"
(B1).