Export (0) Print
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Collapse the table of content
Expand the table of content
Expand Minimize

DefaultMember (MDX)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns the default member of a hierarchy.

Hierarchy_Expression.DefaultMember

Hierarchy_Expression

A valid Multidimensional Expressions (MDX) expression that returns a hierarchy.

The default member on an attribute is used to evaluate expressions when an attribute is not included in a query.

Example

The following example uses the DefaultMember function, in conjunction with the Name function, to return the default member for the Destination Currency dimension in the Adventure Works cube. The example returns US Dollar. The Name function is used to return the name of the measure rather than the default property of the measure, which is value.

WITH MEMBER Measures.x AS 
   [Destination Currency].[Destination Currency].DefaultMember.Name
SELECT Measures.x ON 0
FROM [Adventure Works]
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft