MDX query to find the default measure of a cube

This MDX query is quite handy if you’re unsure of the default measure in a cube.
Note if a default measure is not specified in the cube then the first measure will be used.

WITH
MEMBER [Measures].[dMemberName] AS
[Measures].DefaultMember.Member_Name

SELECT
{
[Measures].[dMemberName]
} ON 0

FROM [Adventure Works]

Leave a Reply

Your email address will not be published. Required fields are marked *