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 6471425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:13:22+00:00 2026-05-25T06:13:22+00:00

I have a fairly complex OLAP database, which basically amounts to a header record,

  • 0

I have a fairly complex OLAP database, which basically amounts to a “header” record, and a huge number of “Members” which belong to that header.

My current MDX query gets the aggregated sum “Value” of members sliced by Age band and type of member. Here is the query:

SELECT 
(
    [Measures].[Member Value]
) 
ON COLUMNS, 
NON EMPTY  
( 
    {
       [Header].[Client Hierarchy].[Group Name].&[The Company]&[UK]&[ABC Group],
       [Header].[Client Hierarchy].[Group Name].&[The Company]&[UK]&[DEF Group]
    }
    [Header].[Member Type].[Member Type],
    [Member].[Age Band].[Age Band]
) 
ON ROWS 
FROM [Cube]
WHERE 
(
  [Header].[Another Attribute].&[Something],    
  [Header].[Created Date].&[2010-12-31T00:00:00],
  [Member].[A Boolean Attribute].&[False]
)

I am trying to add another measure to this query to get the number of members aggregated in each row of the resultset. I achieved this using this calculated member:

WITH MEMBER [Measures].[Member Count] AS
COUNT(  
    EXISTING ([Member].[Id].[Id],[Measures].[Member Value])
    ,EXCLUDEEMPTY
)

And of course added it into the COLUMNS

SELECT 
(
    [Measures].[Member Value],
    [Measures].[Member Count]
) 
...

However this chnages the query from taking ~1second originally to ~1:14minutes

Im thinking this is more to do with my cube structure than the query itself, does anyone have any hints as to what I need to change in my cube structure, or possibly a more efficient way of querying the same thing? I have seen some examples online of using SUM rather than count but they were more to do with COUNT and FILTER together.

  • 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-25T06:13:22+00:00Added an answer on May 25, 2026 at 6:13 am

    For the record I determined that I already had a Measure that would sum up my records.

    The member table had a measure which represented “The number of members this record represents” This had a 1 in it for all the records I was looking at (single members). Simply adding this measure summed that value across my slice.

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

Sidebar

Related Questions

I have a fairly complex method in my controller that basically outputs data to
I have a fairly complex database that needs to be deployed to a variety
In my ASP.NET MVC app, I have a fairly complex edit page which combines
Our users have created MS-Excel spreadsheets which over time have evolved into fairly complex
I have a fat GUI that it getting fairly complex, and I would like
I have a web page that I use to update a fairly complex data
In an ASP.NET application, I have a small number of fairly complex, frequently used
I have a fairly complex business application written in ASP.NET that is deployed on
I have a fairly complex model needing to be validated, the problem is that
I have a fairly complex object which has some C# code written to render

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.