Class PercentileFunDef

  • All Implemented Interfaces:
    FunDef

    class PercentileFunDef
    extends AbstractAggregateFunDef
    Definition of the Percentile MDX function.

    There is some discussion about what the "right" percentile function is. Here is a good overview. Wikipedia also lists methods of calculating percentile.

    This class based on MS Excel formulae:

    rank = P / 100 * (N - 1) + 1
    percentile = A[n]+d*(A[n+1]-A[n])

    Definition can also be found on Wikipedia

    • Constructor Detail

      • PercentileFunDef

        public PercentileFunDef​(FunDef dummyFunDef)
    • Method Detail

      • compileCall

        public Calc compileCall​(ResolvedFunCall call,
                                ExpCompiler compiler)
        Description copied from interface: FunDef
        Converts a call to this function into executable objects.

        The result must implement the appropriate interface for the result type. For example, a function which returns an integer must return an object which implements IntegerCalc.

        Specified by:
        compileCall in interface FunDef
        Overrides:
        compileCall in class FunDefBase