Rozměry (MDX)

Vrací hierarchii určenou číselným nebo řetězcovým výrazem.

Syntax

  
Numeric expression syntax  
Dimensions(Hierarchy_Number)  
  
String expression syntax  
Dimensions(Hierarchy_Name)  

Arguments

Hierarchy_Number
Platný číselný výraz, který určuje hierarchické číslo.

Hierarchy_Name
Platný řetězcový výraz, který specifikuje název hierarchie

Remarks

Pokud je zadáno číslo hierarchie, funkce Dimensions vrátí hierarchii, jejíž nulová pozice v kostce je zadaná číslem hierarchie.

Pokud je specifikováno jméno hierarchie, funkce Dimensions vrátí zadanou hierarchii. Obvykle používáte tuto verzi řetězce funkce Dimensions s uživatelsky definovanými funkcemi.

Note

Dimenze Míry je vždy reprezentována .Dimensions(0)

Examples

Následující příklady používají funkci Dimensions k vrácení jména, počtu úrovní a počtu členů dané hierarchie, přičemž používají jak číselný výraz, tak řetězcový výraz.

WITH MEMBER Measures.x AS Dimensions  
   ('[Product].[Product Model Lines]').Name  
SELECT Measures.x on 0  
FROM [Adventure Works]  
  
WITH MEMBER Measures.x AS Dimensions  
   ('[Product].[Product Model Lines]').Levels.Count  
SELECT Measures.x on 0  
FROM [Adventure Works]  
  
WITH MEMBER Measures.x AS Dimensions  
   ('[Product].[Product Model Lines]').Members.Count  
SELECT Measures.x on 0  
FROM [Adventure Works]  
  
WITH MEMBER Measures.x AS Dimensions(0).Name  
SELECT Measures.x on 0  
FROM [Adventure Works]  
  
WITH MEMBER Measures.x AS Dimensions(0).Levels.Count  
SELECT measures.x on 0  
FROM [Adventure Works]  
  
WITH MEMBER Measures.x AS Dimensions(0).Members.Count  
SELECT measures.x on 0  
FROM [Adventure Works]