Table of Contents

Class KPI

Inheritance
KPI
Implements
Inherited Members
Namespace
TabularEditor.TOMWrapper
Assembly
TOMWrapper.dll

Represents a Key Performance Indicator object. It is a child of a Measure object.

public sealed class KPI : TabularObject, ICustomTypeDescriptor, INotifyPropertyChanging, IDescriptionObject, IAnnotationObject, IExtendedPropertyObject, IDaxDependantObject, IExpressionObject, ITabularTableObject, IDaxObject, ITabularNamedObject, ITabularObject, INotifyPropertyChanged, INamedObject
Extension Methods

Properties

Annotations

The collection of Annotations on the current KPI.

[Browsable(true)]
public AnnotationCollection Annotations { get; }

Property Value

Type Description
AnnotationCollection

DaxObjectFullName

[Browsable(false)]
public string DaxObjectFullName { get; }

Property Value

Type Description
string

DaxObjectName

[Browsable(false)]
public string DaxObjectName { get; }

Property Value

Type Description
string

DaxTableName

[Browsable(false)]
public string DaxTableName { get; }

Property Value

Type Description
string

DependsOn

Gets the list of objects that this KPI depends on.

[Browsable(false)]
public DependsOnList DependsOn { get; }

Property Value

Type Description
DependsOnList

Description

The description of the KPI, visible to developers at design time and to administrators in management tools, such as SQL Server Management Studio.

public string Description { get; set; }

Property Value

Type Description
string

Expression

An expression that is use to calculate the status of this KPI. Alias for StatusExpression

[Browsable(false)]
public string Expression { get; set; }

Property Value

Type Description
string

ExtendedProperties

The collection of Extended Properties on the current KPI.

public ExtendedPropertyCollection ExtendedProperties { get; }

Property Value

Type Description
ExtendedPropertyCollection

Measure

A reference to a Measure object that owns this KPI.

public Measure Measure { get; }

Property Value

Type Description
Measure

MeasureName

public string MeasureName { get; }

Property Value

Type Description
string

MetadataIndex

[Browsable(false)]
public int MetadataIndex { get; }

Property Value

Type Description
int

Name

[Browsable(false)]
public string Name { get; set; }

Property Value

Type Description
string

ReferencedBy

Gets the list of objects that reference this measure.

[Browsable(false)]
public ReferencedByList ReferencedBy { get; }

Property Value

Type Description
ReferencedByList

StatusDescription

A description of the Status value for the KPI.

public string StatusDescription { get; set; }

Property Value

Type Description
string

StatusExpression

An expression that is used to calculate the status of the KPI.

public string StatusExpression { get; set; }

Property Value

Type Description
string

StatusGraphic

The recommended graphic to represent the status of this KPI.

[TypeConverter(typeof(KPIStatusGraphicConverter))]
public string StatusGraphic { get; set; }

Property Value

Type Description
string

Table

[Browsable(false)]
public Table Table { get; }

Property Value

Type Description
Table

TargetDescription

The description of the target value of the KPI.

public string TargetDescription { get; set; }

Property Value

Type Description
string

TargetExpression

An expression that evaluates to a number and indicates the goal for the KPI.

public string TargetExpression { get; set; }

Property Value

Type Description
string

TargetFormatString

The format string to be used when presenting the target value for the KPI.

[TypeConverter(typeof(FormatStringConverter))]
public string TargetFormatString { get; set; }

Property Value

Type Description
string

TrendDescription

A description of the trend value of the KPI.

public string TrendDescription { get; set; }

Property Value

Type Description
string

TrendExpression

An expression representing the trend of the KPI.

public string TrendExpression { get; set; }

Property Value

Type Description
string

TrendGraphic

A string that identifies the graphic to show for the trend of the KPI.

[TypeConverter(typeof(KPITrendGraphicConverter))]
public string TrendGraphic { get; set; }

Property Value

Type Description
string

Methods

CanDelete()

public bool CanDelete()

Returns

Type Description
bool

CanDelete(out string)

public bool CanDelete(out string message)

Parameters

Type Name Description
string message

Returns

Type Description
bool

ClearAnnotations()

Removes all annotations from this object.

public void ClearAnnotations()

ClearExtendedProperties()

Removes all Extended Properties from this object.

public void ClearExtendedProperties()

CreateFromMetadata(Measure, KPI)

public static KPI CreateFromMetadata(Measure parent, KPI metadataObject)

Parameters

Type Name Description
Measure parent
KPI metadataObject

Returns

Type Description
KPI

CreateNew(Measure)

public static KPI CreateNew(Measure parent)

Parameters

Type Name Description
Measure parent

Returns

Type Description
KPI

Delete()

public void Delete()

GetAnnotation(int)

Gets the value of the annotation with the given index, assuming it exists.

public string GetAnnotation(int index)

Parameters

Type Name Description
int index

Returns

Type Description
string

GetAnnotation(string)

Gets the value of the annotation with the given name. Returns null if no such annotation exists.

public string GetAnnotation(string name)

Parameters

Type Name Description
string name

Returns

Type Description
string

GetAnnotations()

Gets a collection of all annotation names on the current KPI.

public IEnumerable<string> GetAnnotations()

Returns

Type Description
IEnumerable<string>

GetAnnotationsCount()

Gets the number of annotations on the current KPI.

public int GetAnnotationsCount()

Returns

Type Description
int

GetExtendedProperties()

Gets a collection of all ExtendedProperty names on the current object.

public IEnumerable<string> GetExtendedProperties()

Returns

Type Description
IEnumerable<string>

GetExtendedProperty(int)

Gets the value of the ExtendedProperty with the given index, assuming it exists.

public string GetExtendedProperty(int index)

Parameters

Type Name Description
int index

Returns

Type Description
string

GetExtendedProperty(string)

Gets the value of the ExtendedProperty with the given name. Returns null if no such ExtendedProperty exists.

public string GetExtendedProperty(string name)

Parameters

Type Name Description
string name

Returns

Type Description
string

GetExtendedPropertyCount()

Gets the number of ExtendedProperties on the current object.

public int GetExtendedPropertyCount()

Returns

Type Description
int

GetExtendedPropertyType(int)

Gets the type of the ExtendedProperty with the given index, assuming it exists.

public ExtendedPropertyType GetExtendedPropertyType(int index)

Parameters

Type Name Description
int index

Returns

Type Description
ExtendedPropertyType

GetExtendedPropertyType(string)

Gets the type of the ExtendedProperty with the given name, assuming it exists.

public ExtendedPropertyType GetExtendedPropertyType(string name)

Parameters

Type Name Description
string name

Returns

Type Description
ExtendedPropertyType

GetNewAnnotationName()

Returns a unique name for a new annotation.

public string GetNewAnnotationName()

Returns

Type Description
string

GetNewExtendedPropertyName()

Returns a unique name for a new ExtendedProperty.

public string GetNewExtendedPropertyName()

Returns

Type Description
string

HasAnnotation(string)

Returns true if an annotation with the given name exists. Otherwise false.

public bool HasAnnotation(string name)

Parameters

Type Name Description
string name

Returns

Type Description
bool

HasExtendedProperty(string)

Returns true if an ExtendedProperty with the given name exists. Otherwise false.

public bool HasExtendedProperty(string name)

Parameters

Type Name Description
string name

Returns

Type Description
bool

OnPropertyChanged(string, object, object)

Fired after a property is changed

protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)

Parameters

Type Name Description
string propertyName
object oldValue
object newValue

RemoveAnnotation(string)

Remove an annotation by the given name.

public void RemoveAnnotation(string name)

Parameters

Type Name Description
string name

RemoveExtendedProperty(string)

Remove an ExtendedProperty by the given name.

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.

public void SetAnnotation(int index, string value)

Parameters

Type Name Description
int index
string value

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.

public void SetAnnotation(string name, string value)

Parameters

Type Name Description
string name
string value

SetExtendedProperty(int, string, ExtendedPropertyType)

Sets the value of the ExtendedProperty with the given index, optionally specifiying the type (string or JSON) of the ExtendedProperty.

public void SetExtendedProperty(int index, string value, ExtendedPropertyType type)

Parameters

Type Name Description
int index
string value
ExtendedPropertyType type

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.

public void SetExtendedProperty(string name, string value, ExtendedPropertyType type)

Parameters

Type Name Description
string name
string value
ExtendedPropertyType type