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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:25:37+00:00 2026-06-08T00:25:37+00:00

I have a problem that’s really killing me. BTW I am new to Mdx

  • 0

I have a problem that’s really killing me. BTW I am new to Mdx and using olap4j Api to construct MDX Query. My problem is with the root element, Following is the code snippet:

     Query myQuery = new Query("Generated Query", sales); // where sales is an object of type cube.
QueryDimension productDimension = myQuery.getDimension("Product");

So now I have an object with dimension Product to use. I want some thing like this [Product].[All Products] to be part of the MdxQuery when I add productDimension to an axis. I can hardcode [All Products] but if the dimensionName passed is other than Product, say Stores it would be an issue. SO what I want is, whether it would be possible to fetch some thing get the names like [All Products] or [All Stores] or [definite Measures] which is equivalent to [All Measures] dynamically using olap4j?

PS: This is a method which takes in a dimension name and returns the first Member of the dimension like [Product].[All Products] if product is passed or [Measures].[All Measures/some Measures] if measures are passed.

  • 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-08T00:25:39+00:00Added an answer on June 8, 2026 at 12:25 am

    I was able to figure out on how to get the root element To get some thing like All Products or basically all member name then I need to do some thing as shown below:

    Say, I want the all member name for productDimension[object of type Dimension for product] then,

       Member allMember = productDimension.getDimension().getDefaultHierarchy().getRootMembers().get(0);
    
       productDimension.include(Selection.Operator.MEMBER, allMember);
    

    By doing so allMember will be part of the Mdx Query.

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

Sidebar

Related Questions

I have a problem that can basically be summirized as: Byte[] barr = new
I have a problem that Google Map API is inheriting the style from my
I have a problem that I would like have solved via a SQL query.
I have a problem that I believe I need to use grouping using xsl:key
I have a problem that I cannot wrap my head around. I'm using Apache
I have a problem that adding a new ROW with duplicate UNIQUE id throws
I am new to ObC and have a problem that i just cant fix.
In a couple of scripts that I use I have problem that is intermittent.
I have a problem that I'm working on for quite some time now. I
I have a problem that has been driving me batty. I have code that

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.