Solved

How to put measures in olap4j api ?

Posted on 2015-02-18
1
110 Views
Last Modified: 2015-02-19
I am using mondrian server and olap4j api.
How to I put measures in olap4j api ?
In olap4j Measures are treated as Dimensions, but how do I include them in query ?

QueryDimension dimn1=query.getDimension(getDim1());
	QueryDimension dimn2=query.getDimension(getDim2());
	QueryDimension dimn3=query.getDimension(getDim3());
	       //QueryDimension measure1=query.getDimension(getMeasure());
	

	query.getAxis(Axis.COLUMNS).addDimension(dimn1);
	query.getAxis(Axis.ROWS).addDimension(dimn2);    
	query.getAxis(Axis.COLUMNS).addDimension(dimn3); 

Open in new window

0
Comment
Question by:Pradip Shenolkar
1 Comment
 

Accepted Solution

by:
Pradip Shenolkar earned 0 total points
ID: 40618621
I found the solution :
Its working

Query query=new Query("query1",cube1);
QueryDimension measure1=query.getDimension("Measures");
	measure1.include(IdentifierNode.ofNames("Measures",measureName).getSegmentList());
query.getAxis(Axis.FILTER).addDimension(measure1);										
	

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question