Create a calculated measure based on a dimensional value using MDX

Answered Create a calculated measure based on a dimensional value using MDX

  • Thursday, January 31, 2013 5:43 AM
     
     

    HI,

          I'm new to MDX and I'm having trouble creating a measure based on a dimensional Value. I have a cube called Reservation Cube and a Dimension called "ReservationState" which has a billability column. I want to create a measure which would give me the number of reservations which were billable.

         I know I can use a where clause filter but i dont want to do that as I want the billable, non billable and total reservations in a single query.

    Please help

    Thanks,

    Abhishek


    Thanks, Abhishek

All Replies

  • Thursday, January 31, 2013 6:20 AM
     
     Answered Has Code

    try this:

    Sum([measures].[Measurename],[ReservationState].[Billabilitycolumn].&[1])

    1 indictates the billable

    Ex in adventureworks

    with member sum1 as
    sum([Measures].[Internet Sales Amount],[Product].[Style].&[w])
    select {[Measures].[Internet Sales Amount],sum1} on 0,
    {[Product].[Product Categories].[Category].members} on 1 from [Adventure Works]

    Regards,Eshwar


    Please don't forget to Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. It will helpful to other users.

    • Marked As Answer by Abhishek_007 Thursday, January 31, 2013 6:27 AM
    •  
  • Thursday, January 31, 2013 6:27 AM
     
     

    Thanks a lot Eshwar.

    Works like a charm


    Thanks, Abhishek