Calculated Member only gives out null Values, Why ?

  • I Need to do the following calculation in mdx (i hope the code is straightforward, if clarification is needed please tell)

    ([Orders].[Customer].CurrentMember, [Measures].[InvoiceAmount]) / (Root([Orders]), [Measures].[InvoiceAmount])

    but all I'm getting is NULL Values, can anybody see what is Wrong ? Thanks to all of you in advance, your always great help is much appreciated.

    SQL Server 2012

  • You do not state the context of the query (SSAS cube design calculations tab, SSMS query or SSRS report dataset)

    ----- SSAS Scoped assignment

    DECLARE MEMBER CURRENTCUBE.[Measures].[PercentRoot-Scoped]

    AS "N/A", VISIBLE = 1, FORMAT_STRING="0.00%";

    SCOPE ([Measures].[PercentRoot-Scoped], [Geography].[City].[City].MEMBERS);

    THIS = ([Geography].[City].CURRENTMEMBER, [Measures].[Internet Sales Amount]) /

    (ROOT([Geography]),[Measures].[Internet Sales Amount]);

    END SCOPE;

    ----- SSMS and SSRS

    WITH MEMBER [Measures].[PercentOfRoot] AS

    ([Geography].[City].CURRENTMEMBER, [Measures].[Internet Sales Amount]) /

    (ROOT([Geography]),[Measures].[Internet Sales Amount]),

    FORMAT_STRING = '0.00%'

    SELECT

    {[Measures].[Internet Sales Amount], [Measures].[PercentOfRoot]} ON COLUMNS,

    NON EMPTY [Geography].[City].[City].MEMBERS ON ROWS

    FROM

    [Sales Cube]

    It may be that the ROOT is not available (isaggregateable?) or that the ROOT value is NULL (calculation assignment?).

    Fitz

  • Thanks a lot

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply