Solved

How to put measures in olap4j api ?

Posted on 2015-02-18
1
124 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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