Package mondrian.udf

Class InverseNormalUdf

  • All Implemented Interfaces:
    UserDefinedFunction

    public class InverseNormalUdf
    extends java.lang.Object
    implements UserDefinedFunction
    A user-defined function which returns the inverse normal distribution value of its argument.

    This particular function is useful in Six Sigma calculations, for example,

     WITH MEMBER [Measures].[Yield]
             AS '([Measures].[Number of Failures] / [Measures].[Population])',
             FORMAT_STRING = "0.00%"
         MEMBER [Measures].[Sigma]
             AS 'IIf([Measures].[Yield] <> 0,
                     IIf([Measures].[Yield] > 0.5,
                         0,
                         InverseNormal(1 - ([Measures].[Yield])) + 1.5), 6)',
             FORMAT_STRING = "0.0000"
     
    • Constructor Detail

      • InverseNormalUdf

        public InverseNormalUdf()
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: UserDefinedFunction
        Returns the name with which the user-defined function will be used from within MDX expressions.
        Specified by:
        getName in interface UserDefinedFunction
      • execute

        public java.lang.Object execute​(Evaluator evaluator,
                                        UserDefinedFunction.Argument[] args)
        Description copied from interface: UserDefinedFunction
        Applies this function to a set of arguments, and returns a result.
        Specified by:
        execute in interface UserDefinedFunction
        Parameters:
        evaluator - Evaluator containts the runtime context, in particular the current member of each dimension.
        args - Expressions which yield the arguments of this function. Most user-defined functions will evaluate all arguments before using them. Functions such as IIf do not evaluate all arguments; this technique is called lazy evaluation.
        Returns:
        The result value.
      • getReservedWords

        public java.lang.String[] getReservedWords()
        Description copied from interface: UserDefinedFunction
        Returns a list of reserved words used by this function. May return an empty array or null if this function does not require any reserved words.
        Specified by:
        getReservedWords in interface UserDefinedFunction