Solved

How to put measures in olap4j api ?

Posted on 2015-02-18
1
103 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now