Results 1 to 3 of 3

Thread: MDX Calculated Member Help

  1. #1
    Join Date
    Jan 2009
    Posts
    2

    MDX Calculated Member Help

    HI,

    I am new to the world of MDX and any help would be greatly appreciated.

    I am trying to write a calculated member to give me the sum of the lowest level of a hierarchy and then roll those numbers up as you drill up through the hierarchy. Also, I want the measure to only calculate the Pharmacy level's descendants.

    Here is where I am.

    SUM ( DESCENDANTS([Care Conn Catalog Synonym].[Catalog Type Hierarchy].[Catalog Type Desc].currentmember,[Care Conn Catalog Synonym].[Catalog Type Hierarchy].[Catalog Type Desc].&[Pharmacy]) ,[Measures].[CPOE Order Count])

    As written I get a #Value Error.

    Thank you in advance for your help!

  2. #2
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607

    Can You Restate in the Adventure Works Scenario?

    Would you mind restating this using the Adventure Works cube? That will allow us to get you a working example as an answer.

    Many thanks!

    Bill

  3. #3
    Join Date
    Jan 2009
    Posts
    2

    Adventure Works Scenario

    Hi,

    Thanks for the quick reply. No problem. Here is what I believe is the equivalent calculation using Adventure works.

    SUM ( DESCENDANTS([Product].[Product Categories].[Category].currentmember,[Product].[Product Categories].[Category].&[1]) ,[Measures].[Order Count])

    So I would like the calculation to add up all Bike Orders and then when I drill down to the Subcategory level to only show the order count for those members that belong to the bike category and to do the same for Product level if I were to drill down again. I hope that makes sense.

    Thank you again for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •