Share via


2.2.5.35 CalculationExpression Object

The CalculationExpression object represents a value that is calculated based on an expression. It is a child of a CalculationGroup object and requires compatibility level 1605 or higher.<95>

The CalculationExpression object has the following properties.

Name

Type

Description

ID

unsignedLong

A reference to the object.

CalculationGroupID

unsignedLong

An ID-based reference to a CalculationGroup object.

FormatStringDefinitionID

unsignedLong

An ID-based reference to a FormatStringDefinition object.

Name

string

The name of the object.

Description

string

The description of the object.

ModifiedTime

dateTime

The time that the object was last modified.

State

enumeration

A value that provides information about the state of the calculation group expression. The possible values are as follows:

  • Ready (1) – The calculation group expression is queryable and has up-to-date data.

  • NoData (3) – Not applicable to CalculationExpression.

  • CalculationNeeded (4) – Not applicable to CalculationExpression.

  • SemanticError (5) – The CalculationExpression expression has a semantic error.

  • EvaluationError (6) – Not applicable to CalculationExpression.

  • DependencyError (7) – A dependency associated with this calculation item is in an error state (SemanticError, EvaluationError, or DependencyError).

  • Incomplete (8) – Not applicable to CalculationExpression.

  • SyntaxError (9) – The calculation group expression has a syntax error in its expression.

ErrorMessage

string

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.

Expression

string

The DAX expression that is evaluated for the calculation group expression.

SelectionMode

enumeration

A value that provides information about how this calculation group expression will be applied to measures. The possible values are as follows:

  • Unknown (1) – An invalid SelectionMode.

  • MultipleOrEmptySelection (2) – Apply this calculation to the selected measure reference if, and only if, multiple calculation items have been selected, a non-existing calculation item has been selected, or a conflicting selection has been made.

  • NoSelection (3) – Apply this calculation to the selected measure reference if, and only if, the parent calculation group is unfiltered.