Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%DeepSee] >  [PlugIn] >  [Distinct]
Private  Storage   

class %DeepSee.PlugIn.Distinct extends %DeepSee.KPIPlugIn

%DeepSee.PlugIn.Distinct This plugin can be used to get the count of distinct values for a given level in a given cell. For example: %KPI("%DeepSee.Distinct","DISTINCT",1,"%level","[DocD].[H1].[Doctor]","%CONTEXT") The above returns the number of unique doctors contained in the set of fact for a cell. Use the "%level" parameter to tell the plugin which level you are interested in -- use [].[].[]

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 3


Summary

Properties
%factCount %filterValues %fromCache %id
%message %plugInListingKey %rangeLower %rangeUpper
%seriesCount %seriesNames %source %sqlResultSet
%thresholdLower %thresholdUpper

Methods
%AddToSaveSet %CheckResource %ClassIsLatestVersion %ClassName
%ClearKPICache %ComputeKPICacheKey %ComputeKPITimestamp %ConstructClone
%CreateKPIController %CreateModelInstance %DeleteModel %DispatchClassMethod
%DispatchGetModified %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%Extends %GetBaseCube %GetFilterDisplayValue %GetFilterKey
%GetFilterLogicalValue %GetJSValidationCode %GetKPICaption %GetKPICaptionName
%GetKPIClassTimeStamp %GetKPIName %GetKPIPropertyCaption %GetKPIValue
%GetKPIValueArray %GetMDXContextFilter %GetMDXForFilter %GetMDXText
%GetMembersForFilter %GetParameter %GetPlugInType %GetPropertyInfo
%GetSQLForFilter %GetSQLText %GetSourceType %InvokeAction
%IsA %IsAsync %IsCacheable %IsModified
%IsPublic %IsReadOnly %LoadKPIFromCache %New
%NormalizeObject %ObjectModified %OnCompute %OnComputeKPITimestamp
%OnCopyDataFromModel %OnCopyDataToModel %OnDashboardAction %OnDeleteModel
%OnDeleteSource %OnExecute %OnGetActionList %OnGetAnalysisResultSet
%OnGetFilterList %OnGetFilterMembers %OnGetKPICaption %OnGetKPIPropertyInfo
%OnGetListingFields %OnGetListingMaxRows %OnGetListingOrderBy %OnGetListingResultSet
%OnGetListingSQL %OnGetListingSource %OnGetMDX %OnGetPropertyInfo
%OnGetSQL %OnInvokeAction %OnLoadKPI %OnLoadKPIFromCache
%OnLoadModel %OnNewSource %OnOpenSource %OnSaveKPIToCache
%OnSaveSource %OnStoreModel %OnSubmit %OpenModel
%OriginalNamespace %PackageName %PrintValue %RemoveFromSaveSet
%SaveKPIToCache %SaveModel %SerializeObject %SetModified
%SetPercentComplete %SubmitHandler %TestKPICache %ValidateKPICache
%ValidateObject ConvertParameter Decrypt Encrypt
EscapeHTML EscapeURL HyperEventCall HyperEventHead
Include InsertHiddenField InsertHiddenFields IsPrivate
Link OnHTTPHeader OnPage OnPageError
OnPostHTTP OnPostHyperEvent OnPreHTTP OnPreHyperEvent
Page QuoteJS RewriteURL ShowError
StartTimer StopTimer ThrowError UnescapeHTML
UnescapeURL


Parameters

• parameter ASYNC = 1;
If true, then this KPI can be executed asychronously.
• parameter BASECUBE = "*";
Cube(s) that this plug-in is based on.
• parameter CACHEABLE = 1;
If true, then results for this KPI can be cached.
• parameter LISTINGSOURCE = "FactTable";
Specifies the source of the listing data used by this plugin: "SourceTable" - the data source supplies the listing values; "FactTable" - the fact table supplies the listing values.
• parameter PLUGINTYPE = "Aggregate";
Specifies the type of this plug-in. This indicates the context in which this plug-in is used.
"Pivot" -- the plug-in is visible within the Analyzer dimension tree.
"Aggregate" -- the plug-in is not visible within the Analyzer dimension tree.

Methods

• method %OnCompute(pSQLRS As %SQL.StatementResult, pFactCount As %Integer) as %Status
This is where we actually do work in the PlugIn. We are given an SQL result set of all the facts included in this cell. We can loop over the facts and exclude doubles from the count
• 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.
• method %OnGetMDX(ByRef pMDX As %String) as %Status
Get the base query for this plug-in.


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.