dynamic percent of total calc

  • I have a measure called amount and would like to calc a percent of total by dividing the amount by the grand total amount.  All the examples I have seen require that the dimension name be used in the calc to get to the grand total.  However, the dimensions can easily change and I would rather not have to create a separate calc for each posible dimension.  In the examples below, the dimension changes from store to city.  It would be nice if I could do a calc something like this for the calc that doesn't need to know the dimension and can reference the grand total of the current measure group.

    (amount.current / sum(amount.allmembers))  --This returns an error--

    example for store:

                                    Amount                 Percent of total

    Store x                    5000                        50%

    Store y                   5000                        50%

    Grand total            10000                      100%

     

    example for city:

                                    Amount                 Percent of total

    City x                      5000                        50%

    City y                     5000                        50%

    Grand total            10000                      100%

     

    Thanks.

  • Most likely better to perform in you front end than on the data side. But that is my only thought right off.

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

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