Table of Contents

Class CalculationGroupTable

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

Calculation Group Tables are special tables that only contain a single column

public class CalculationGroupTable : Table, ICustomTypeDescriptor, INotifyPropertyChanging, IComparable, IDescriptionObject, ILineageTagObject, IExtendedPropertyObject, ITabularPerspectiveObject, IHideableObject, ITranslatableObject, IAnnotationObject, ISynonymObject, IClonableObject, ITabularObjectContainer, IDaxObject, IDaxDependantObject, IExpressionObject, ITabularNamedObject, ITabularObject, INotifyPropertyChanged, INamedObject, ITomErrorMessageObject
Extension Methods

Properties

CalculationGroup

The Calculation Group object owned by this Calculation Group Table

public CalculationGroup CalculationGroup { get; }

Property Value

Type Description
CalculationGroup

CalculationGroupAnnotations

Annotations on the Calculation Group object.

public AnnotationCollection CalculationGroupAnnotations { get; }

Property Value

Type Description
AnnotationCollection

CalculationGroupDescription

The description of the Calculation Group object.

public string CalculationGroupDescription { get; set; }

Property Value

Type Description
string

CalculationGroupPrecedence

When multiple Calculation Groups are used as a filter condition, this property determines the order of evaluation.

public int CalculationGroupPrecedence { get; set; }

Property Value

Type Description
int

CalculationItems

The collection of CalculationItem items on the CalculationGroup of this table.

public CalculationItemCollection CalculationItems { get; }

Property Value

Type Description
CalculationItemCollection

ErrorMessage

Gets the error message currently reported on this calculation group table.

public override string ErrorMessage { get; }

Property Value

Type Description
string

MultipleOrEmptySelectionDescription

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

public string MultipleOrEmptySelectionDescription { get; set; }

Property Value

Type Description
string

MultipleOrEmptySelectionExpression

The expression defined on this object will be applied to the selected measure in DAX queries, when multiple calculation items are aplied.

public string MultipleOrEmptySelectionExpression { get; set; }

Property Value

Type Description
string

MultipleOrEmptySelectionFormatStringExpression

The format string expression defined on this object will be applied to the selected measure in DAX queries, when multiple calculation items are aplied.

public string MultipleOrEmptySelectionFormatStringExpression { get; set; }

Property Value

Type Description
string

NoSelectionExpression

The expression defined on this object will be applied to the selected measure in DAX queries, when no calculation items are applied.

public string NoSelectionExpression { get; set; }

Property Value

Type Description
string

NoSelectionExpressionDescription

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

public string NoSelectionExpressionDescription { get; set; }

Property Value

Type Description
string

NoSelectionFormatStringExpression

The format string expression defined on this object will be applied to the selected measure in DAX queries, when no calculation items are applied.

public string NoSelectionFormatStringExpression { get; set; }

Property Value

Type Description
string

ObjectType

The type of this object (Folder, Measure, Table, etc.).

public override ObjectType ObjectType { get; }

Property Value

Type Description
ObjectType

Reordering

Set to true, when multiple calculation items are going to be re-ordered as one action.

[Browsable(false)]
public bool Reordering { get; }

Property Value

Type Description
bool

Methods

AddCalculationItem(string, string)

Adds a calculation item with the given name and expression to the calculation group table.

public CalculationItem AddCalculationItem(string name = null, string expression = null)

Parameters

Type Name Description
string name
string expression

Returns

Type Description
CalculationItem

CompactLevelOrdinals()

public void CompactLevelOrdinals()

CreateNew(Model, string)

public static CalculationGroupTable CreateNew(Model parent, string name = null)

Parameters

Type Name Description
Model parent
string name

Returns

Type Description
CalculationGroupTable

FixItemOrder(CalculationItem, int)

public void FixItemOrder(CalculationItem item, int newOrdinal)

Parameters

Type Name Description
CalculationItem item
int newOrdinal

GetChildren()

Returns all columns, measures, and hierarchies inside this table.

public override IEnumerable<ITabularNamedObject> GetChildren()

Returns

Type Description
IEnumerable<ITabularNamedObject>

GetExpression(ExpressionProperty)

Gets the specified expression from the current object.

public override string GetExpression(ExpressionProperty expressionProperty)

Parameters

Type Name Description
ExpressionProperty expressionProperty

Returns

Type Description
string

Exceptions

InvalidEnumArgumentException

Thrown when the current object does not support the specified ExpressionProperty

GetExpressionProperties()

Gets all supported expression properties on the current object.

public override IEnumerable<ExpressionProperty> GetExpressionProperties()

Returns

Type Description
IEnumerable<ExpressionProperty>

Init()

Derived members should override this method to instantiate child objects

protected override void Init()

SetExpression(ExpressionProperty, string)

Sets the specified expression on the current object.

public override void SetExpression(ExpressionProperty expressionProperty, string expression)

Parameters

Type Name Description
ExpressionProperty expressionProperty
string expression

Exceptions

InvalidEnumArgumentException

Thrown when the current object does not support the specified ExpressionProperty

SetItemOrder(IList<CalculationItem>)

public void SetItemOrder(IList<CalculationItem> order)

Parameters

Type Name Description
IList<CalculationItem> order