Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 348807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:23:58+00:00 2026-05-12T11:23:58+00:00

I have a situation where I have a product and a time dimension, with

  • 0

I have a situation where I have a product and a time dimension, with a fact table of sales volume. Over time, various details about the product changes, with the except of the business key for the product. In my flat reporting from the cube, I want to include some aggregration at the ‘business key’ level, regardless of what other parts of the product dimension are shown.

In sql this would be trivial as something like:

select sum(volume) over (partition by productKey,year) as Total

Regardless of whatever else I had selected, the Total column would be aggregated only on those two fields.

In MDX I have managed to achieve the same result, but it seems like there must be a simpler way.

WITH MEMBER Measures.ProductKeyTotal AS
  'SUM(([Product].[ProductKey],[Time].[Year]
       ,[Product].[Product Name].[Product Name].ALLMEMBERS
       ,[Volume Type].[Volume Type Id].[Volume Type Id].ALLMEMBERS)
       ,[Measures].[Volume])'
SELECT {[Measures].[Volume],[Measures].[ProductKeyTotal]} ON COLUMNS,
    NONEMPTYCROSSJOIN ([Product].[ProductKey].[ProductKey].ALLMEMBERS
      ,[Time].[Time].[Year].ALLMEMBERS
      ,[Product].[Product Name].[Product Name].ALLMEMBERS
      ,[Volume Type].[Volume Type Id].[Volume Type Id].ALLMEMBERS) ON ROWS
FROM [My Cube]
WHERE ([Product].[Include In Report].&[True])

1) If I don’t include the allmembers for the rows I don’t want in the calculated member the total is not correct, is there a shortcut to force it to ignore all the dimensions other that what you specify?

Part of the reason I ask is that I need to add a bunch of other calculated members, some of which will be using parameters and if I use the method from the example above I am going to need to duplicate the same stuff in multiple places, and the code will get weighty.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:23:58+00:00Added an answer on May 12, 2026 at 11:23 am

    Well, first of all, don’t use NonEmptyCrossJoin–it’s been deprecated. Use non empty and then the cross join operator (*).

    It’s important to understand how tuples and tuple sets work to answer your question. Essentially, any dimension not explicitly stated will always get the CurrentMember of a given dimension. Typically, this is DefaultMember, but if you have it set to something else in your query, that will change this up. The reason you have to specify ALLMEMBERS for those dimensions is because it will use CurrentMember, otherwise. You could just use the [All] member in lieu of trying to sum up ALLMEMBERS (especially if they’re not flat!), which will give you a bit better performance.

    The most performant way to do this is to add another Measure Group to your cube, and then remove the keys that don’t apply to the measure from that Measure Group. This way, you get a native calculation for these rather than a run-time calculation (which tend to be slow, especially when you’re adding up everything in your cube). Moreover, you can even set up some aggregation design on that Measure Group, and it will be very performant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation where a defined table structure changes based on a control
We have a situation in our product where for a long time some data
I have a situation where I need access to a shopping cart over several
Situation is we have a product that we build for masses, we have it
I have a Product database table with columns such as product_id , price ,
I have the following situation (in Rails 3): my table contains financial transactions for
I have a product table with 100000 products and also I have a user
So situation is following : We have some very old product, that has dozen
Here is the situation: I have a table value function with a datetime parameter
I have a situation where there are thousands of products where each product price

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.