%DeepSee.PlugIn.StdDev
Class %DeepSee.PlugIn.StdDev Extends %DeepSee.KPIPlugIn [ System = 4 ]
This plugin can be used to get the standard deviation of distinct values for a given measure in a given cell. For example:
%KPI("%DeepSee.Variance","VARIANCE",1,"%measure","[Amount Sold]","%CONTEXT")
The above returns the standard deviation of the Revenues contained in the set of facts for a cell. Use the "%measure" parameter to tell the plugin which measure should be used
Parameters
BASECUBE
Parameter BASECUBE = "*";
Cube(s) that this plug-in is based on.
LISTINGSOURCE
Parameter LISTINGSOURCE = "FactTable";
PLUGINTYPE
Parameter PLUGINTYPE = "Aggregate";
XDatas
KPI
XData KPI [ XMLNamespace = "http://www.intersystems.com/deepsee/kpi" ]
This XData definition defines the KPI.
Methods
%OnGetMDX
Method %OnGetMDX(ByRef pMDX As %String) As %Status
Get the base query for this plug-in.
%OnGetListingFields
Method %OnGetListingFields() As %String
Returns the field list (RETURN clause) of the listing used to supply data for this plug-in. In this case, determine which measure we need.
%OnCompute
Method %OnCompute(pSQLRS As %SQL.StatementResult) As %Status
Compute the standard deviation of values within the result set.