共用方式為


2.2.5.8 Measure Object

The Measure object represents a value that is calculated based on an expression. It is a child of a Table object.

The Measure object has the following properties.

Name

Type

Description

ID

unsignedLong

A reference to the object.

TableID

unsignedLong

An ID-based reference to a Table object.

Name

string

The name of the object.

Description

string

The description of the object.

DataType

enumeration

The data type of the measure. The possible values are as follows:

  • String (2)

  • Int64 (6)

  • Double (8)

  • DateTime (9)

  • Decimal (10)

  • Boolean (11)

  • Binary (17)

  • Unknown (19) - a measure in an error state.

  • Variant (20) - a measure with varying data type.

Expression

string

The DAX expression that is evaluated for the calculated measure.

FormatString

string

A string that specifies the format of the measure contents. For a description of the FormatString content, see [MSDN-FSCMDX].

IsHidden

boolean

A Boolean that indicates whether the measure is treated as hidden by client visualization tools.

If the measure is treated as hidden by client visualization tools, it is "true"; otherwise, it is "false".

State

enumeration

A value that provides information about the state of the measure. The possible values and their interpretation are as follows:

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

  • NoData (3) – Not applicable to Measure.

  • CalculationNeeded (4) – Not applicable to Measure.

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

  • EvaluationError (6) - Not applicable to Measure.

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

  • Incomplete (8) - Not applicable to Measure.

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

ModifiedTime

dateTime

The time that the object was last modified.

StructureModifiedTime

dateTime

The time that the structure of the object was last modified.

KPIID

unsignedLong

An ID-based reference to a KPI object.

IsSimpleMeasure

boolean

A Boolean that indicates whether the measure is an implicit measure that is automatically created by client tools to aggregate a field. Client applications can hide measures that have this flag set.

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.

DisplayFolder

string

A string that defines the display folder in which the measure is displayed by the client applications.

DetailRowsDefinitionID<49>

unsignedLong

An ID-based reference to a DetailRowsDefinition object. This property defines the DAX expression to apply when drilling through to the detail rows of the measure.

Compatibility level 1400 or higher is required.

FormatStringDefinitionID<50>

unsignedLong

An ID-based reference to a FormatStringDefinition object.

Compatibility level 1601 or higher is required.

DataCategory<51>

string

Specifies the kind of data that is contained in the measure so that a user can add custom behaviors based on the data type of the measure.

Compatibility level 1500 or higher is required.

LineageTag<52>

string

An optional tag that can be used to define the lineage of a measure across different versions of a model.

Compatibility level 1600 or higher is required.

SourceLineageTag<53>

string

An optional tag that can be used to define the lineage of a referenced measure across different versions of a model. As opposed to LineageTag, SourceLineageTag can be used to define the lineage of a referenced measure rather than a measure itself. SourceLineageTag is useful when a model references other models by using a Direct Query connection.

Compatibility level 1600 or higher is required.