I’m trying to permanently create a calculated dimension member using a MDX ADOMD command from C# code.
The following MDX script creates the member but it’s only available for the current session.
CREATE MEMBER [Cube].[Dimension].[Hierarchy].[My Member Name] as
Aggregate({
[Dimension].[Hierarchy].[Level].&[1], [Dimension].[Hierarchy].[Level].&[2], ...
})
How to permanently create it?
Never tried it, but I found some AMO code that appears to do this, it’s loading the current MDX calculation script from the cube, adding to it, then posting it back.
Found at http://www.win8s.com/sql-server/sql-server-analysis-services/2011/programically-changing-calculated-members.html
I use AMO elsewhere, but haven’t used it like this, so do report back on results 🙂