Table of Contents

Class CalculatedTableColumn

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

Represents a column in a Table that is based on a DAX expression. A collection of CalculatedTableColumn, under a Table object bound to a partition with Source of type CalculatedPartitionSource, results in a calculated table.

public sealed class CalculatedTableColumn : Column, ICustomTypeDescriptor, INotifyPropertyChanging, IComparable, IFolderObject, ITabularTableObject, ITomErrorMessageObject, IDescriptionObject, IFormattableObject, ILineageTagObject, IExtendedPropertyObject, ITabularPerspectiveObject, IHideableObject, ITranslatableObject, IAnnotationObject, ISynonymObject, IDaxObject, ITabularNamedObject, ITabularObject, INotifyPropertyChanged, INamedObject, IClonableObject
Extension Methods

Properties

ColumnOrigin

Returns a ColumnOrigin object. Applicable only to non-calculated columns of a calculated table. ColumnOrigin points to another column which is the source of this column' metadata and data.

[Browsable(false)]
public Column ColumnOrigin { get; }

Property Value

Type Description
Column

IsNameInferred

A boolean value indicating whether name of the column is inferred by the server.

public bool IsNameInferred { get; set; }

Property Value

Type Description
bool

Parent

The parent Table of the current Calculated Table Column.

public Table Parent { get; }

Property Value

Type Description
Table

SourceColumn

Name of the column from which data will be retrieved. The name must match a column returned during processing or refresh, where the partition source is an expression (as the Expression of a CalculatedPartitionSource).

public string SourceColumn { get; set; }

Property Value

Type Description
string

Methods

AllowDelete(out string)

Derived classes should override this method to prevent an object from being deleted. If left un-overridden, always returns TRUE and sets message to null.

protected override bool AllowDelete(out string message)

Parameters

Type Name Description
string message

If an object CANNOT be deleted, this string should provide a reason why. If an object CAN be deleted, this string may optionally provide a suitable warning message that applies if the object is deleted immediately after the call to CanDelete.

Returns

Type Description
bool

True if an object can be deleted. False otherwise.

Clone(string, bool, Table)

Creates an exact copy of this CalculatedTableColumn object.

public CalculatedTableColumn Clone(string newName = null, bool includeTranslations = true, Table newParent = null)

Parameters

Type Name Description
string newName
bool includeTranslations
Table newParent

Returns

Type Description
CalculatedTableColumn

CreateNew(Table, string)

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

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

Parameters

Type Name Description
Table parent
string name

Returns

Type Description
CalculatedTableColumn

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

OnPropertyChanging(string, object, ref bool, ref bool)

Called before a property is changed on an object. Derived classes can control how the change is handled. Throw ArgumentException within this method, to display an error message in the UI.

protected override void OnPropertyChanging(string propertyName, object newValue, ref bool undoable, ref bool cancel)

Parameters

Type Name Description
string propertyName

Name of the changed property.

object newValue

New value assigned to the property.

bool undoable

Return false if automatic undo of the property change is not needed.

bool cancel

Return true if the property change should not apply.