Export (0) Print
Expand All

3.9 Metadata

Office

This example shows metadata (section 2.2.4) for cube functions and the external connection (section 2.2.8) used with them.

This example uses a sample workbook with cell values as specified in the following table.

Cell

Formula

Result

B2

=CUBESET("Sales", "[Product].[All Products].Children", "Products")

Products

C2

=CUBEMEMBER("Sales", "[Measures].[Profit]")

Profit

B3

=CUBERANKEDMEMBER("Sales", $B$2, 1)

Drink

C3

=CUBEVALUE("Sales", $B3, C$2)

29358.9754

B4

=CUBERANKEDMEMBER("Sales", $B$2, 2)

Food

C4

=CUBEVALUE("Sales", $B4, C$2)

245764.8665

B5

=CUBERANKEDMEMBER("Sales", $B$2, 3)

Non-Consumable

C5

=CUBEVALUE("Sales", $B5, C$2)

64487.0545

B6

Grand Total

Grand Total

C6

=CUBEVALUE("Sales", $B$2,C$2)

339610.8964

This example’s sample workbook is illustrated by the following figure.

Dd926166.aa91c9d2-91ec-45af-b752-c02cd403b0c4(en-us,office.12).jpg

Figure 29: Metadata example workbook

This example includes all of the records in the external data connections part (section 2.1.7.24) and in the metadata (section 2.1.7.34) part except for BrtEnd* records, which have been omitted for brevity. Additionally, certain records which occur multiple times in the file are documented a fewer number of times in this example, again for brevity.

The records in the external data connections (section 2.1.7.24) part are BrtBeginExtConnections (section 2.4.77), BrtBeginExtConnection (section 2.4.76), BrtBeginECDbProps (section 2.4.57), and BrtBeginECOlapProps (section 2.4.58). Together, these records specify a connection to an OLAPdata source (1).

The rest of the records in this example are in the metadata part.

BrtBeginMetadata (section 2.4.108), BrtBeginEsmdtinfo (section 2.4.71), BrtBeginEsstr (section 2.4.73), and BrtBeginEsmdx (section 2.4.72) specify the beginning of collections as specified in their respective section 2 specifications.

BrtMdtinfo (section 2.4.674) specifies the name and properties of the value metadata type for MDX Metadata (section 2.2.4.8) which is the metadata type (section 2.2.4.1) used in this example.

Four of the six BrtStr (section 2.4.754) records in the file are shown in this example. These records specify shared text strings used by other records in this example.

Next, four of the nine sequences of records that conform to the MDX rule (defined in section 2.1.7.34) are shown in this example. In each, the BrtBeginMdx (section 2.4.102) record specifies the data connection name and the type of cube function that generated the metadata (section 2.2.4).

  • The first example of a sequence of records that conforms to the MDX rule specifies the metadata associated with cell B2 in the example and includes one BrtBeginMdx (section 2.4.102) record and one BrtBeginMdxSet (section 2.4.105) record.

  • The second example of a sequence of records that conforms to the MDX rule specifies the metadata associated with cell B3 in the example and includes one BrtBeginMdx record, one BrtBeginMdxTuple (section 2.4.106) record and one BrtMdxMbrIstr (section 2.4.675) record.

  • The third example of a sequence of records that conforms to the MDX rule specifies the metadata associated with cell C2 in the example and includes one BrtBeginMdx record, one BrtBeginMdxTuple record and one BrtMdxMbrIstr record.

  • The fourth example of a sequence of records that conforms to the MDX rule specifies the metadata associated with cell C6 in the example and includes one BrtBeginMdx record, one BrtBeginMdxTuple record and two BrtMdxMbrIstr records.

Finally, the BrtBeginEsmdb (section 2.4.70) and BrtMdb (section 2.4.673) records specify the association between the BrtBeginMdx records and the BrtMdtinfo (section 2.4.674) record which specifies the metadata type (section 2.2.4.1).

Show:
© 2015 Microsoft