Table of Contents

Class CalculationGroup

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

Represents a collection of Calculation Items.

public sealed class CalculationGroup : TabularObject, ICustomTypeDescriptor, INotifyPropertyChanging, IDescriptionObject, IAnnotationObject, ITabularObject, INotifyPropertyChanged
Extension Methods

Remarks

This metadata object is only supported when the compatibility level of the database is at 1470 or above.

Properties

Annotations

The collection of Annotations on the current Calculation Group.

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

Property Value

Type Description
AnnotationCollection

CalculationItems

The collection of CalculationItem objects on this CalculationGroup.

[Browsable(false)]
public CalculationItemCollection CalculationItems { get; }

Property Value

Type Description
CalculationItemCollection

Description

The description of the CalculationGroup, 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

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

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

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

Precedence

Defines an evaluation order of CalculationGroup objects.

public int Precedence { get; set; }

Property Value

Type Description
int

Table

The parent table of the current Calculation Group.

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

Property Value

Type Description
Table

Methods

ClearAnnotations()

Removes all annotations from this object.

public void ClearAnnotations()

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 Calculation Group.

public IEnumerable<string> GetAnnotations()

Returns

Type Description
IEnumerable<string>

GetAnnotationsCount()

Gets the number of annotations on the current Calculation Group.

public int GetAnnotationsCount()

Returns

Type Description
int

GetNewAnnotationName()

Returns a unique name for a new annotation.

public string GetNewAnnotationName()

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

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

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

ToString()

public override string ToString()

Returns

Type Description
string