Measure Interface

NoteNote

  This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.

Measures are the quantitative, numerical columns from the fact table of a cube. When a cube is processed, the data in the measures is aggregated across the dimensions in the cube. The aggregate functions are: Sum, Min, Max, Count, and Distinct Count.

In Decision Support Objects (DSO), the objects that implement the Measure interface have a ClassType property value of clsCubeMeasure, clsPartitionMeasure, or clsAggregationMeasure. These objects serve as containers for measure objects within each respective parent object. The Measure interface provides collections and properties that allow you to manipulate these objects. There are no methods associated with this interface. For more information about cube, partition, and aggregation objects, and how they relate to each other, see Introducing Decision Support Objects.

Not all of the objects that implement the Measure interface implement all of the properties of the interface. The properties of some objects may be restricted to read-only access, depending upon their type. For example, a clsCubeMeasure object allows read and write access to its FormatString property. Access to this property for any other measure object is read-only. The collections and properties of the Measure interface also apply to the measures of virtual cubes, although no special class is implemented for virtual cube measures. There are no methods associated with the Measure interface.

To illustrate the place of measures in a fact table, consider the case of a database that contains the following tables:

  • Sales_Facts

  • Customer

  • Product

  • Promotion

  • Product_Class

  • Store

  • Calendar

The following diagram illustrates the relationships of these tables.

If you build a cube based upon this database, the Sales_Facts table will be the fact table. The related tables will be the dimensions. The Sales_Quantity, Unit_Price, and Unit_Cost rows are measures that can be precalculated across dimensions such as Store, Customer, or Product.

Community Additions

ADD
Show: