How do I get .AllMembers of Hierarchy in olap4j?

96 Views Asked by At

I have an MDX query like this:

SELECT {[Gender].[Gender].AllMembers} ON COLUMNS, 
{[Geography].[Country].AllMembers} ON ROWS FROM [myCube]

And I am trying to get this query as an olap4j object. I do this to set my dimension:

QueryDimension genderDim =  myQuery.getDimension("GENDER");

But that produces just one column of "All Genders" and "All Geographys" respectively.

How do I get them broken down like the MDX query above?

1

There are 1 best solutions below

0
On

If you switch to the MEMBERS function does that help?

SELECT 
  {[Gender].[Gender].MEMBERS}     ON COLUMNS, 
  {[Geography].[Country].MEMBERS} ON ROWS 
FROM [myCube];