Hi Julian Hyde.
Can you give me an example of like managing parameters received by the user and these can be part of a calculated member or statement MDX (<CalculatedMember name="" dimension="Measures", ...) to execute an operation with those data.
I check the example the UserDefinedFunction (PlusOneUdf) but it throws me the following error:
Mondrian Error:No function matches signature 'PlusOne(<Member>)'
In the statement MDX
WITH MEMBER [Measures].[Unit Sales Plus One]
AS 'PlusOne([Measures].[Unit Sales])'
SELECT
{[Measures].[Unit Sales]} ON COLUMNS,
{[Gender].MEMBERS} ON ROWS
FROM [Sales]
En the file xml I have:
<UserDefinedFunction name="PlusOne" class="com.acme.PlusOneUdf"/>
<CalculatedMember name="PlusOne" dimension="Measures" formula="PlusOne([Measures].[unit_sales])">
<CalculatedMemberProperty name="FORMAT_STRING" value="$#,###.##"/>
</CalculatedMember>
In the file .java (PlusOneUdf.java) implements UserDefinedFunction and import the follow:
import mondrian.olap.*;
import mondrian.olap.type.*;
import mondrian.spi.UserDefinedFunction;
Thank you, very much.


Reply With Quote