Skip to main content

Defining a Calculated Member That Uses a Plug-in

Defining a Calculated Member That Uses a Plug-in

For any plug-in (and any other KPI), you can create a calculated member that retrieves values from it. Then users can drag and drop this member within the Analyzer. To create such a calculated member:

  • Define a calculated measure as described in Defining a Calculated Measure.

  • For Expression, specify an MDX expression of the following form:

    %KPI(pluginname,propertyname,seriesname,"%CONTEXT")
    

    Where pluginname is the name of the plug-in, propertyname is the name of the property, and seriesname is the name of the series. You can omit seriesname; if you do, this function accesses the first series in the plug-in.

    "%CONTEXT" is a special parameter that provides row, column, and filter context to the plug-in; this information is passed to the base MDX query used by the plug-in.

    For example (for a plug-in with only 1 series):

    %KPI("PluginDemo2","Count",,"%CONTEXT")
    

    For plug-ins with PLUGINTYPE equal to "Pivot", when a user drags and drops a plug-in property, the Analyzer automatically uses syntax like this in the underlying MDX query that it generates.

    For additional options, see %KPI.

FeedbackOpens in a new tab