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

  • Home
  • SEARCH
  • 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 7841505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:06:55+00:00 2026-06-02T16:06:55+00:00

I am attempting to implement paging to large datasets in MDX (SSAS). I have

  • 0

I am attempting to implement paging to large datasets in MDX (SSAS).

I have the following to retrieve paged data which works fine:

SELECT 
{ 
  [Measures].[Mesasure1],
  [Measures].[Measure2]
} ON COLUMNS, 
SUBSET
(
  ORDER 
  (
    {
      (
        [Item].[Category].ALLMEMBERS
      )
    }, NULL, BASC
  ), 10, 50  --10 = start index, 50 = returned roes
) 
ON ROWS
FROM ( SELECT ( { [Time].[Date].&[2012-04-15T00:00:00]:[Time].[Date].&[2012-04-20T00:00:00] } ) ON COLUMNS
FROM [DataMartPerformance]
))

However I cannot for the life of me find anywhere on the internet that helps explain how to get the total rows available. Do I do it in a seperate query? If so how?
Or can I wrap it into this one query somehow?

  • 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-06-02T16:06:55+00:00Added an answer on June 2, 2026 at 4:06 pm

    Similar to how you’d do TSQL paging, you’ll need to run another query to count the total elements. You may have to tinker with this depending on how you’ve done your original query, but I use something like:

    WITH 
    MEMBER [Measures].[ElementCount] AS
    {
        NONEMPTY
        (
            {
                [Item].[Category].ALLMEMBERS *
                { [Time].[Date].&[2012-04-15T00:00:00]:[Time].[Date].&[2012-04-20T00:00:00] } 
            },
            {
                [Measures].[Mesasure1],
                [Measures].[Measure2]
            }
        )
    }.COUNT
    
    SELECT
    {
        [Measures].[ElementCount]
    }
    ON COLUMNS
    FROM 
    [DataMartPerformance]
    

    For filtering, you can do dimension filters by using an exists against your dimension attributes:

    WITH 
    MEMBER [Measures].[ElementCount] AS
    {
        NONEMPTY
        (
            EXISTS
            (
                {
                    [Item].[Category].ALLMEMBERS *
                    { [Time].[Date].&[2012-04-15T00:00:00]:[Time].[Date].&[2012-04-20T00:00:00] } 
                },
                {
                    [Dimension].[Attribute].[FilterByThisAttribute]
                }
            ),
            {
                [Measures].[Mesasure1],
                [Measures].[Measure2]
            }
        )
    }.COUNT
    
    SELECT
    {
        [Measures].[ElementCount]
    }
    ON COLUMNS
    FROM 
    [DataMartPerformance]
    

    I haven’t got to writing the measure value filters yet, I need to do that next for my own MDX paging constructor…

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

Sidebar

Related Questions

I am currently attempting to implement a custom gridview interface to display data from
I have a web form that I am attempting to implement dynamic drop down
I have been attempting to implement a custom dojo build to replace the dojo
I'm attempting to implement BFS in Python, I understand how the algorithm works but
I'm attempting to implement a PreInsertEvent listener using the latest version (which was at
I'm attempting to implement a phpBB library into Kohana. I have created a vendor
I am attempting to implement a pagination bar above a table. I have a
I'm attempting to implement an animated drawable with the following... <?xml version=1.0 encoding=UTF-8?> <animation-list
I'm attempting to implement the technique for data validation from Josh Smith's example here:
I am attempting to implement a quiet uninstall of my application. This works great

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.