I have a proposed requirement for a #SSAS dimension attribute default member to dynamically change depending on the perspective being used (when the cube is browsed through management studio or through Excel). The expression below works when the cube is referenced in an MDX query. However, it does not work when the cube is browsed through management studio or Excel. Is this because the default member is only realised at MDX query run time? If so is it at all possible to set a dimension attribute default member that dynamically changes depending on the perspecting being browsed by a cube browser such as EXCEL?
So far I have tried setting the #MDX Expression to specifiy the default member of the dimension attribute to:
CASE WHEN [Measures].defaultmember.properties("Cube_Name") = "Display"
THEN [Media Type].[Media Type].&[Display]
WHEN [Measures].defaultmember.properties("Cube_Name") = "Search"
THEN [Media Type].[Media Type].&[Search]
ELSE [Media Type].[Media Type].[ALL]
END
Any suggestions of how to proceed are welcome.