Share via


Measure Element (CSDL)

The Measure element defines a calculation that can be used within a tabular model to present aggregations, or to serve as a KPI. The Measure element is based on the Property element.

A Measure element can have the following child elements, in the order listed:

  • Documentation Element

  • Annotation Element

  • Kpi Element

Applicable Attributes

The table below describes the attributes that can be found on the Measure element, in addition to all attributes applicable to the Property element.

Attribute Name

Is Required

Value

DefaultImage

Yes

A reference to an image that indicates negative, neutral, or positive progress against the targets defined in the KPI.

ContextualNameRule

No

A string value that defines an alternate name for the measure.

DisplayFolder

No

A reference to a folder in which the measure is presented, if any.

FolderPosition

No

An integer that indicates the ordinal position of the measure in the folder list.

Hidden

No

A true/false value that indicates whether the measure should be visible in reports.

ReferenceName

No

A name that DAX formulas can use to reference the measure.

Alignment

No

A value that indicates the default alignment in a report of measure values.

FormatString

No

A .NET format string that defines the default formatting for date and time values.

IsFolderDefault

No

A true/false value that indicates whether the column represented by the measure should be the default field for the folder.

Units

No

A string value that defines the unit of measure used to present the values in the measure.

Width

No

An integer value that defines the width, in characters, of the column used to display the measure.

SortDirection

No

A reference to a property that defines the sort direction for the measure.

IsRightToLeft

No

A true/false value that indicates whether the values in the column must be presented right-to-left.

IsSimpleMeasure

A true/false value that indicates whether the formula used in the measure is one of the default aggregations (SUM, COUNT, MIN, MAX, AVG) and thus can processed in the query, for faster performance.

Example

The following sample shows two measures from the AdventureWorks tabular model sample. The second measure has been converted to a KPI, by adding KPI elements.

</Property>
<Property Name="Order_Lines_Count" Type="Int64">
  <bi:Measure Caption="Order Lines Count" ReferenceName="Order Lines Count" Width="0" IsSimpleMeasure="false" />
</Property>
<Property Name="Total_Current_Quarter_Sales_Performance" Type="Double">
  <bi:Measure Caption="Total Current Quarter Sales Performance" ReferenceName="Total Current Quarter Sales Performance" Width="0" IsSimpleMeasure="false">
    <bi:Kpi StatusGraphic="Three Signs Colored">
      <bi:KpiGoal>
        <bi:PropertyRef Name="Measures___Total_Current_Quarter_Sales_Performance_Goal_" />
      </bi:KpiGoal>
      <bi:KpiStatus>
        <bi:PropertyRef Name="Measures___Total_Current_Quarter_Sales_Performance_Status_" />
      </bi:KpiStatus>
    </bi:Kpi>
  </bi:Measure>
</Property>

Comments for sample