Databases Reference
In-Depth Information
TYPED)'
SELECT { [Measures].[-DimBrowseKey 0-] } ON 0,
HEAD ( [Dim Geography].[Geography].[All
Countries].CHILDREN, 1000) ON 1
FROM [$Dim Geography]
The goal of the MDX query is to retrieve all the members that are children of
the All Countries level. Similar to the MDX query that was sent to retrieve
members in level 0, this query only retrieves the first 1,000 children of All
Countries level. This is accomplished by use of the HEAD function as seen in
the MDX query. This query includes a calculated measure called Measures.[-
DimBrowseKey 0-], which is selected in the MDX query. The calculated meas-
ure expression in this query retrieves the key of the current member by using
the MDX function Properties. The MDX function Properties returns a string
value based on the parameters passed to it. The Properties function returns
the value of the member property that is specified as the first argument to the
expression. In this query the value requested is the Key of the current mem-
ber.
Other parameters that can be passed to the Properties function are NAME,
ID, and CAPTION, or the name of a member property or related attribute. The
properties NAME, ID, KEY, and CAPTION are called as intrinsic member
properties since all attributes and hierarchies will have these properties. The
second argument passed to the Properties function is optional and the only
value that can be passed is TYPED. If the Properties function is called
without the second parameter, the function returns the string representation of
the property. If the second argument TYPED is passed to the Properties func-
tion, the function returns the data type of the property (data type that was
defined in the data source) requested. For example, if the first argument is
Key and if the Key of this attribute is of type integer, the Properties function
returns integer values. Typically the second parameter TYPED is useful if you
want to filter the results based on a member property. For example, if the key
of the Geography hierarchy is an integer and if you want to see only the chil-
dren of member United States, you can use the FILTER function along with
the calculated measure that has been created using the parameter TYPED.
The result of the preceding MDX query is shown in the following table. The di-
mension browser retrieves this information and shows the names of the mem-
bers in the hierarchical format shown in Figure 5-19 .
Search WWH ::




Custom Search