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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:48:36+00:00 2026-06-16T19:48:36+00:00

I am new to MDX, and have a simple requirement which would be easy

  • 0

I am new to MDX, and have a simple requirement which would be easy to do with SQL, but I would like to accomplish this with MDX.

I would like to combine the result, of 2 queries, so when quering the cube, I only send over 1 query.

 
select topcount( [Fact].[Year].children, 1,[Measures].[MoneyIn]) on columns
from [Cube]  

and also this MDX query, to get the least money in, for a period of years.

 
select bottomcount( [Fact].[Year].children, 1,[Measures].[MoneyIn]) on columns
from [Cube]  

Is there an easy way to accomplish this with MDX? Ideally I would have something :

MaxValue MinValue
10k      -10k 

Thanks! All help appreciated!

  • 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-16T19:48:37+00:00Added an answer on June 16, 2026 at 7:48 pm

    You could write your query a few different ways. This puts the counts in one column:

    SELECT [Measures].[MoneyIn] ON COLUMNS,
    {TOPCOUNT([Fact].[Year].children,1, [Measures].[MoneyIn]),
    BOTTOMCOUNT([Fact].[Year].children,1, [Measures].[MoneyIn])} ON ROWS
    FROM [Cube]
    

    This is closer to your output but without the named columns

    SELECT [Measures].[MoneyIn] *
           {TOPCOUNT([Fact].[Year].children,1, [Measures].[MoneyIn]),
            BOTTOMCOUNT([Fact].[Year].children,1, [Measures].[MoneyIn])
           } ON COLUMNS
    FROM [Cube]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pretty new to SSAS, OLAP and MDX syntax. So I have this
Proficient with SQL but new to MDX, I am having trouble getting my head
new to python. This is probably simple but I haven't found an answer. rndStr
I have two queries which I would like to join together,which would give me
To all excuse my ignorance, but I'm new to MDX below is the query
New to PHP and MySQL, have heard amazing things about this website from Leo
I'm new to MDX and have a problem regarding filtering out values from a
I'm quite new to MDX and im having some trouble getting the following t-sql
Not sure if this is the right place for MDX question but it seemed
I'm new to MDX so bear with me. I have crossed joined two dimensions

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.