Results 1 to 7 of 7

Thread: Simple Question - Creating Calculated Member for %

  1. #1
    Join Date
    Dec 2003
    Posts
    140

    Simple Question - Creating Calculated Member for %

    Hi,

    As the users drill down one of the dimensions, I want to show the breakup of each sub member in terms of %age e.g.

    Suppose total Sales are 300 and breakup is as follows:
    Category A = $ 120
    Category B = $ 65
    Category C = $ 115


    I want that when the user drills down to the 2nd level in the Products dimension (let's say this Level is called Category) then I want the %age of Sales for each category - all adding up to 100

    So this is what I should get (for the desired % breakup)

    Category A = 40
    Category B = 22
    Category C = 38


    I'll appreciate your help in making such a Calculated field.

    Many TIA.

  2. #2
    Join Date
    Sep 2002
    Posts
    169
    You could start with something like

    [Measures].[Some measure] / Sum ( [Category].CurrentMember.Parent, [Measures].[Some measure])

  3. #3
    Join Date
    Dec 2003
    Posts
    140
    [Measures].[Some measure] / Sum ( [Category].CurrentMember.Parent, [Measures].[Some measure])

    Thanks.

    In the MDX, is "[Category]" a reserved word are you you using it in a generic manner.... i have seen similar examples but am unable to make use of these examples becuase all seemsto have used the "[Category]" ....

  4. #4
    Join Date
    Sep 2002
    Posts
    169
    Category is the name of your dimension (the one you are drilling down on)

  5. #5
    Join Date
    Dec 2003
    Posts
    140
    Thanks Stephen. Will post back after trying this out.

  6. #6
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607
    Not sure how it went, as I didn't see the postback on results. Thought I might offer an article that does this as one of the examples (it's a basic contibution percentage calculated member) - in a way that might help you to gain a more complete picture.

    http://www.databasejournal.com/featu...0894_2211921_1

    Let us know if this helps. It benefits everyone if forum items are pronounced "satisfied," as this is the only way anyone (searching on the keywords for a solution, etc.) knows if a suggestion someone made was helpful ...

    Bill

    Bill Pearson


    Island Technologies Inc.
    931 Monroe Drive
    Suite 102-321
    Atlanta, GA 30308

    wep3@islandtechnologies.com

  7. #7
    Join Date
    Dec 2003
    Posts
    140
    I did give Stephen's suggestiona try but ran into some confusions andthenthings got busy and I did not get to come back to it.

    However it's at the back of my mind and I totally see and agree with your point regarding posting back andhow it can help other members.

    I guess I have gotten into too many new things related to this BI/cube stuff and am finding it a little difficult to manage and absorb at the moment. I just hope that thisis normal n natural and it's not just me



    Regards.

Posting Permissions

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