Olap4j documentation gives a good example of constructing simple MDX query:
Query myQuery = new Query("SomeArbitraryName", salesCube);
QueryDimension productDim = myQuery.getDimension("Product");
QueryDimension storeDim = myQuery.getDimension("Store");
QueryDimension timeDim = myQuery.getDimension("Time");
myQuery.getAxis(Axis.COLUMNS).addDimension(productDim);
myQuery.getAxis(Axis.ROWS).addDimension(storeDim);
myQuery.getAxis(Axis.FILTER).addDimension(timeDim);
However, there is no info how to put measure
into the query.
Is there a way to do this using Olap4j API?
From the point of view of MDX, there is a dimension called
Measures
, which has no hierarchies, but all the measures as its members. Thus, I would assume you can use this dimension like all the other dimensions and add it to the query.