Mark Carpenter
Mark Carpenter

Reputation: 17775

Can I Select a Calculated Member On the "Row" Dimension in MDX?

I know I can do this (quick example off the top of my head):

WITH 
    Member Measures.AnotherDataColumn AS [MyDimension].CurrentMember.Properties("MyProperty")
SELECT 
    {
        Measures.DataColumn,
        Measures.AnotherDataColumn
    } ON COLUMNS

    {
        [MyDimension].Item
    } ON ROWS

But is there a way to include that same calculated member Measures.AnotherDataColumn in the ROWS dimension?

Thanks in advance!!

Upvotes: 0

Views: 1942

Answers (1)

Darren Gosbell
Darren Gosbell

Reputation: 1940

You can create calculated members in any dimension, not just the measures dimension, but then you need to tell SSAS how you want it to aggregate the measures. Typically this is aggregating a set of other members from the same dimension and you see something like the following using the Aggregate function:

WITH
     Member MyDimension.CalcMember AS Aggregate({[MyDimension].Item1:[MyDimension].Item3})
SELECT
     {
        Measures.DataColumn,
    } ON COLUMNS
    {
        [MyDimension].Item
    } ON ROWS

Upvotes: 1

Related Questions