title | description | ms.date | ms.service | ms.custom | ms.topic | ms.author | ms.reviewer | author |
---|---|---|---|---|---|---|---|---|
Hierarchy Element (CSDLBI) | Microsoft Docs |
Learn about the Hierarchy element, a logical container for fields in a table that can be linked to each other to form a hierarchy. |
10/31/2023 |
analysis-services |
tabular-models |
reference |
kfollis |
kfollis |
kfollis |
[!INCLUDEcsdl-archived]
The Hierarchy element is a logical container for fields in a table that can be linked to each other to form a hierarchy. The Hierarchy element is derived from the CSDL Member element and has been extended to support the hierarchies created in business intelligence data models.
The following table lists the elements and attributes that define the Hierarchy element
Name | Is Required | Description |
---|---|---|
Documentation | No | A description of the hierarchy. |
Level | Yes | One or more Level elements that define the columns used in the hierarchy. See Level Element (CSDLBI). |
In tabular models, hierarchies are created by specifying parent-child relationships among columns in the same table.
The following example, in CSDLBI version 1.0, shows a hierarchy in the AdventureWorks sample model that has been added to the Products table.
<bi:Hierarchy Name="Categoryy">
<bi:Level Name="CategoryName">
<bi:Source>
<bi:PropertyRef Name="CategoryName" />
</bi:Source>
</bi:Level>
<bi:Level Name="ProductName">
<bi:Source>
<bi:PropertyRef Name="ProductName" />
</bi:Source>
</bi:Level>
</bi:Hierarchy>
The following example, in CSDLBI version 1.1, shows a hierarchy from the Contoso Retail Operations cube.
<bi:Hierarchy Name="Product_Hierarchy" Caption="Product Hierarchy" ReferenceName="Product Hierarchy">
<bi:Documentation>
<bi:Summary>DESCRIPTION_ProductModelCateg_Hierarchies</bi:Summary>
</bi:Documentation>
<bi:Level Name="ProductLine">
<bi:Source>
<bi:PropertyRef Name="ProductLine" />
</bi:Source>
</bi:Level>
<bi:Level Name="ModelName">
<bi:Source>
<bi:PropertyRef Name="ModelName" />
</bi:Source>
</bi:Level>
</bi:Hierarchy>