Class KPI
Represents a Key Performance Indicator object. It is a child of a Measure object.
Assembly: TOMWrapper.dll
Syntax
public sealed class KPI : TabularObject, ICustomTypeDescriptor, INotifyPropertyChanging, IDescriptionObject, IAnnotationObject, IExtendedPropertyObject, IDaxDependantObject, IExpressionObject, ITabularTableObject, IDaxObject, ITabularNamedObject, ITabularObject, INotifyPropertyChanged, INamedObject
Properties
Annotations
The collection of Annotations on the current KPI.
Declaration
[Browsable(true)]
public AnnotationCollection Annotations { get; }
Property Value
DaxObjectFullName
Declaration
[Browsable(false)]
public string DaxObjectFullName { get; }
Property Value
DaxObjectName
Declaration
[Browsable(false)]
public string DaxObjectName { get; }
Property Value
DaxTableName
Declaration
[Browsable(false)]
public string DaxTableName { get; }
Property Value
DependsOn
Gets the list of objects that this KPI depends on.
Declaration
[Browsable(false)]
public DependsOnList DependsOn { get; }
Property Value
Description
The description of the KPI, visible to developers at design time and to administrators in management tools, such as SQL Server Management Studio.
Declaration
public string Description { get; set; }
Property Value
Expression
An expression that is use to calculate the status of this KPI. Alias for StatusExpression
Declaration
[Browsable(false)]
public string Expression { get; set; }
Property Value
ExtendedProperties
The collection of Extended Properties on the current KPI.
Declaration
public ExtendedPropertyCollection ExtendedProperties { get; }
Property Value
Measure
A reference to a Measure object that owns this KPI.
Declaration
public Measure Measure { get; }
Property Value
MeasureName
Declaration
public string MeasureName { get; }
Property Value
Declaration
[Browsable(false)]
public int MetadataIndex { get; }
Property Value
Name
Declaration
[Browsable(false)]
public string Name { get; set; }
Property Value
ReferencedBy
Gets the list of objects that reference this measure.
Declaration
[Browsable(false)]
public ReferencedByList ReferencedBy { get; }
Property Value
StatusDescription
A description of the Status value for the KPI.
Declaration
public string StatusDescription { get; set; }
Property Value
StatusExpression
An expression that is used to calculate the status of the KPI.
Declaration
public string StatusExpression { get; set; }
Property Value
StatusGraphic
The recommended graphic to represent the status of this KPI.
Declaration
[TypeConverter(typeof(KPIStatusGraphicConverter))]
public string StatusGraphic { get; set; }
Property Value
Table
Declaration
[Browsable(false)]
public Table Table { get; }
Property Value
TargetDescription
The description of the target value of the KPI.
Declaration
public string TargetDescription { get; set; }
Property Value
TargetExpression
An expression that evaluates to a number and indicates the goal for the KPI.
Declaration
public string TargetExpression { get; set; }
Property Value
The format string to be used when presenting the target value for the KPI.
Declaration
[TypeConverter(typeof(FormatStringConverter))]
public string TargetFormatString { get; set; }
Property Value
TrendDescription
A description of the trend value of the KPI.
Declaration
public string TrendDescription { get; set; }
Property Value
TrendExpression
An expression representing the trend of the KPI.
Declaration
public string TrendExpression { get; set; }
Property Value
TrendGraphic
A string that identifies the graphic to show for the trend of the KPI.
Declaration
[TypeConverter(typeof(KPITrendGraphicConverter))]
public string TrendGraphic { get; set; }
Property Value
Methods
CanDelete()
Declaration
Returns
CanDelete(out string)
Declaration
public bool CanDelete(out string message)
Parameters
Type |
Name |
Description |
string |
message |
|
Returns
ClearAnnotations()
Removes all annotations from this object.
Declaration
public void ClearAnnotations()
ClearExtendedProperties()
Removes all Extended Properties from this object.
Declaration
public void ClearExtendedProperties()
Declaration
public static KPI CreateFromMetadata(Measure parent, KPI metadataObject)
Parameters
Type |
Name |
Description |
Measure |
parent |
|
KPI |
metadataObject |
|
Returns
CreateNew(Measure)
Declaration
public static KPI CreateNew(Measure parent)
Parameters
Type |
Name |
Description |
Measure |
parent |
|
Returns
Delete()
Declaration
GetAnnotation(int)
Gets the value of the annotation with the given index, assuming it exists.
Declaration
public string GetAnnotation(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetAnnotation(string)
Gets the value of the annotation with the given name. Returns null if no such annotation exists.
Declaration
public string GetAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetAnnotations()
Gets a collection of all annotation names on the current KPI.
Declaration
public IEnumerable<string> GetAnnotations()
Returns
GetAnnotationsCount()
Gets the number of annotations on the current KPI.
Declaration
public int GetAnnotationsCount()
Returns
GetExtendedProperties()
Gets a collection of all ExtendedProperty names on the current object.
Declaration
public IEnumerable<string> GetExtendedProperties()
Returns
GetExtendedProperty(int)
Gets the value of the ExtendedProperty with the given index, assuming it exists.
Declaration
public string GetExtendedProperty(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetExtendedProperty(string)
Gets the value of the ExtendedProperty with the given name. Returns null if no such ExtendedProperty exists.
Declaration
public string GetExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetExtendedPropertyCount()
Gets the number of ExtendedProperties on the current object.
Declaration
public int GetExtendedPropertyCount()
Returns
GetExtendedPropertyType(int)
Gets the type of the ExtendedProperty with the given index, assuming it exists.
Declaration
public ExtendedPropertyType GetExtendedPropertyType(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetExtendedPropertyType(string)
Gets the type of the ExtendedProperty with the given name, assuming it exists.
Declaration
public ExtendedPropertyType GetExtendedPropertyType(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetNewAnnotationName()
Returns a unique name for a new annotation.
Declaration
public string GetNewAnnotationName()
Returns
GetNewExtendedPropertyName()
Returns a unique name for a new ExtendedProperty.
Declaration
public string GetNewExtendedPropertyName()
Returns
HasAnnotation(string)
Returns true if an annotation with the given name exists. Otherwise false.
Declaration
public bool HasAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
HasExtendedProperty(string)
Returns true if an ExtendedProperty with the given name exists. Otherwise false.
Declaration
public bool HasExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
OnPropertyChanged(string, object, object)
Fired after a property is changed
Declaration
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)
Parameters
Overrides
RemoveAnnotation(string)
Remove an annotation by the given name.
Declaration
public void RemoveAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
RemoveExtendedProperty(string)
Remove an ExtendedProperty by the given name.
Declaration
public void RemoveExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
SetAnnotation(int, string)
Sets the value of the annotation with the given index, assuming it exists.
Declaration
public void SetAnnotation(int index, string value)
Parameters
SetAnnotation(string, string)
Sets the value of the annotation having the given name. If no such annotation exists, it will be created. If value is set to null, the annotation will be removed.
Declaration
public void SetAnnotation(string name, string value)
Parameters
SetExtendedProperty(int, string, ExtendedPropertyType)
Sets the value of the ExtendedProperty with the given index, optionally specifiying the type (string or JSON) of the ExtendedProperty.
Declaration
public void SetExtendedProperty(int index, string value, ExtendedPropertyType type)
Parameters
SetExtendedProperty(string, string, ExtendedPropertyType)
Sets the value of the ExtendedProperty having the given name. If no such ExtendedProperty exists, it will be created. If value is set to null, the ExtendedProperty will be removed.
Declaration
public void SetExtendedProperty(string name, string value, ExtendedPropertyType type)
Parameters
Implements
Extension Methods