Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Passing date range to mondrian.spi.UserDefinedFunction implementations

$
0
0
Hi,

I want to have non-standard aggregate measures in OLAP cube. E.g. IRR (internal rate of return). Basically, the measure is a forumla based and not one of the standard aggregates, such as SUM, AVG and COUNT. I am thinking of computing such measures using custom Java code by implementing mondrian.spi.UserDefinedFunction interface. The idea is that formula based measure are not stored in the fact table.

Code:

execute(Evaluator evaluator, Argument[] arguments)
method gives me access to Query, Cube, Measures, Dimensions and current members of each Dimensions. (Actually many other information). The issue I have is to pass date range to this method. In MDX, we can filter records by specifying filter for date dimension, e.g. [Time].[1990]:[Time].[2001]. Can we pass this date range to the Java method?

Thanks,
Chir

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>