none
MDX Operation, Syntax correct, Values = NULL

    Question

  • 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

    Wednesday, September 18, 2013 5:35 PM

Answers

  • Are you trying to find out the contribution percent for each customer in relation to the overall invoice amount of all customers ? If yes,

    You try the below one

     

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

     

     

    Wednesday, September 18, 2013 5:48 PM
  • Hi gbobj,

    The Root() function returns a tuple that consists of the All members from each attribute hierarchy within the current scope in a cube, dimension, or tuple, not for cube measures. Please see the following syntax:
    Cube syntax
    Root ()
    Dimension syntax
    Root( Dimension_Name )
    Tuple syntax
    Root( Tuple_Expression )

    Regards,


    Elvis Long
    TechNet Community Support

    Friday, September 20, 2013 7:18 AM

All replies

  • Are you trying to find out the contribution percent for each customer in relation to the overall invoice amount of all customers ? If yes,

    You try the below one

     

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

     

     

    Wednesday, September 18, 2013 5:48 PM
  • Hi gbobj,

    The Root() function returns a tuple that consists of the All members from each attribute hierarchy within the current scope in a cube, dimension, or tuple, not for cube measures. Please see the following syntax:
    Cube syntax
    Root ()
    Dimension syntax
    Root( Dimension_Name )
    Tuple syntax
    Root( Tuple_Expression )

    Regards,


    Elvis Long
    TechNet Community Support

    Friday, September 20, 2013 7:18 AM