Class CalculatedTable
- Inheritance
-
CalculatedTable
- Implements
- Inherited Members
- Namespace
- TabularEditor.TOMWrapper
- Assembly
- TOMWrapper.dll
public class CalculatedTable : Table, ICustomTypeDescriptor, INotifyPropertyChanging, IComparable, IDescriptionObject, ILineageTagObject, IChangedPropertiesObject, IExtendedPropertyObject, ITabularPerspectiveObject, IHideableObject, ITranslatableObject, IAnnotationObject, ISynonymObject, IClonableObject, ITabularObjectContainer, IDaxObject, IDaxDependantObject, ITomErrorMessageObject, IExpressionObject, ITabularNamedObject, ITabularObject, INotifyPropertyChanged, IHandlerObject, INamedObject
- Extension Methods
Properties
DefaultExpressionProperty
Gets the default expression property on the current object.
public override ExpressionProperty? DefaultExpressionProperty { get; }
Property Value
| Type | Description |
|---|---|
| ExpressionProperty? |
Expression
The Expression of this Calculated Table.
[Browsable(true)]
public string Expression { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
AddCalculatedTableColumn(string, string, string, DataType)
Adds a new Calculated Table column to the table.
public CalculatedTableColumn AddCalculatedTableColumn(string name = null, string sourceColumn = null, string displayFolder = null, DataType dataType = DataType.Automatic)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | sourceColumn | |
| string | displayFolder | |
| DataType | dataType |
Returns
| Type | Description |
|---|---|
| CalculatedTableColumn |
Exceptions
CreateNew(Model, string, string)
Creates a new Calculated Table and adds it to the specified Model. Also creates the underlying metadataobject and adds it to the TOM tree.
public static CalculatedTable CreateNew(Model parent, string name = null, string expression = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Model | parent | |
| string | name | |
| string | expression |
Returns
| Type | Description |
|---|---|
| CalculatedTable |
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()
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. |
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