Condividi tramite


Measure Interface

[!NOTA]   Questa funzionalità verrà rimossa a partire dalla prossima versione di Microsoft SQL Server. Non utilizzare questa funzionalità in un nuovo progetto di sviluppo e modificare appena possibile le applicazioni in cui questa funzionalità viene utilizzata.

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.

Applies To

clsAggregationMeasure

clsCubeMeasure

clsPartitionMeasure

Vedere anche

Riferimento

Collections, Measure Interface
Properties, Measure Interface

Guida in linea e informazioni

Assistenza su SQL Server 2005