Table of Contents

Class Set

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

Set object.

public sealed class Set : TabularNamedObject, ICustomTypeDescriptor, INotifyPropertyChanging, IComparable, IFolderObject, ITabularTableObject, IHideableObject, ITomErrorMessageObject, IDescriptionObject, IExpressionObject, ITabularNamedObject, INamedObject, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, IClonableObject
Extension Methods

Remarks

This metadata object is only supported at database compatibility level of 1400 or above for Pbi server.

Properties

Annotations

The collection of Annotations on the current Set.

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

Property Value

Type Description
AnnotationCollection

Description

The description of the set

public string Description { get; set; }

Property Value

Type Description
string

DisplayFolder

Defines the display folder for the Measure, for use by clients.

public string DisplayFolder { get; set; }

Property Value

Type Description
string

ErrorMessage

The string that explains the error state associated with the current object. It is set by the engine only when the state of the object is one of these three values: SemanticError, DependencyError or EvaluationError.

public string ErrorMessage { get; }

Property Value

Type Description
string

Expression

The DAX expression that is evaluated for the calculated set.

public string Expression { get; set; }

Property Value

Type Description
string

ExtendedProperties

The collection of Extended Properties on the current Set.

public ExtendedPropertyCollection ExtendedProperties { get; }

Property Value

Type Description
ExtendedPropertyCollection

IsDynamic

Indicates whether the set is static or dynamic

public bool IsDynamic { get; set; }

Property Value

Type Description
bool

IsHidden

A boolean value that indicates whether the set is treated as hidden by client visualization tools. True if the set is treated as hidden by client visualization tools; otherwise false.

public bool IsHidden { get; set; }

Property Value

Type Description
bool

Parent

The parent Table of the current Set.

public Table Parent { get; }

Property Value

Type Description
Table

State

Provides information on the state of the set. Possible values and their interpretation are as follows. Ready (1) The set is queryable and has up-to-date data. NoData (3) Not applicable to Set. CalculationNeeded (4) Not applicable to Set. SemanticError (5) The set expression has a semantic error. EvaluationError (6) Not applicable to Set. DependencyError (7) A dependency associated with this set is in an error state (SemanticError, EvaluationError, or DependencyError). Incomplete (8) Not applicable to Set. SyntaxError (9) The measure has a syntax error in its expression.

public ObjectState State { get; }

Property Value

Type Description
ObjectState

Table

The parent table of the current Set.

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

Property Value

Type Description
Table

TranslatedDisplayFolders

Collection of localized Display Folders for the current Set.

[Browsable(true)]
public TranslationIndexer TranslatedDisplayFolders { get; }

Property Value

Type Description
TranslationIndexer

Methods

ClearAnnotations()

Removes all annotations from this object.

public void ClearAnnotations()

ClearExtendedProperties()

Removes all Extended Properties from this object.

public void ClearExtendedProperties()

Clone(string, Table)

Creates an exact copy of this Set object.

public Set Clone(string newName = null, Table newParent = null)

Parameters

Type Name Description
string newName
Table newParent

Returns

Type Description
Set

CreateNew(Table, string)

Creates a new Set and adds it to the parent Table. Also creates the underlying metadataobject and adds it to the TOM tree.

public static Set CreateNew(Table parent, string name = null)

Parameters

Type Name Description
Table parent
string name

Returns

Type Description
Set

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 Set.

public IEnumerable<string> GetAnnotations()

Returns

Type Description
IEnumerable<string>

GetAnnotationsCount()

Gets the number of annotations on the current Set.

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

GetMessages()

public IEnumerable<DocumentMessage> GetMessages()

Returns

Type Description
IEnumerable<DocumentMessage>

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

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