Obiee 简明教程

OBIEE – Dimension Hierarchies

层次结构是由多个一对多关系组成的系列关系,可以具有不同的级别。区域层次结构包括:区域 → 国家 → 州 → 城市 → 街道。层次结构遵循自上而下或自下而上的方法。

Hierarchies is a series of many-to-one relationships and can be of different levels. A Region hierarchy consists of: Region → Country → State → City → Street. Hierarchies follow top-down or bottom-up approach.

逻辑维度或维度层次结构在 BMM 层创建。可能有两种类型的维度层次结构 −

Logical dimensions or dimension hierarchies are created in BMM layer. There are two types of dimensional hierarchies that are possible −

  1. Dimensions with level-based hierarchies.

  2. Dimension with Parent-Child hierarchies.

在基于级别的层次结构中,成员可以是不同类型的,并且同类型的成员仅出现在单个级别中。

In level-based hierarchies, members can be of different types and members of the same type come only at single level.

在父子层次结构中,所有成员都是同类型的。

In Parent-Child hierarchies, all members are of the same type.

Dimensions with Level-based Hierarchies

基于级别的维度层次结构还可能包含父子关系。创建基于级别的层次结构的常见顺序是从总计级别开始,然后逐步向下到较低级别。

Level-based dimension hierarchies can also contain parent-child relationships. The common sequence to create level-based hierarchies is to start with grand total level and then working down to lower levels.

基于级别的层次结构允许您执行 −

Level-based hierarchies allows you to perform −

  1. Level-based calculated measures.

  2. Aggregate navigation.

  3. Drill down to child level in dashboards.

每个维度只能有一个总计级别,并且没有级别键或维度属性。您可以将度量与总计级别关联,并且针对这些度量的默认聚合始终是总计。

Each dimension can only have one grand total level and it doesn’t have a level key or dimension attributes. You can associate measures with grand total level and default aggregation for these measures are grand total always.

所有较低级别都应至少有一列,并且每个维度包含一个或多个层次结构。每个较低级别还包含一个级别键,该键定义该级别的唯一值。

All lower levels should have at least one column and each dimension contains one or more hierarchies. Each lower level also contains a level key which defines unique value at that level.

Types of Level-based Hierarchies

Unbalanced Hierarchies

不平衡层次结构是指所有较低级别不具有相同深度的层次结构。

Unbalanced hierarchies are those where all the lower levels don’t have the same depth.

Example − 对于一个产品,在一个月中,您可以获取每周的数据,而对于另一个月,您可以获取逐日数据。

Example − For one product, for one month you can have data for weeks and for other month you can have data available for day level.

Skip Level Hierarchies

在跳过级别层次结构中,少数成员在较高级别没有值。

In skip-level hierarchies, few members don’t have values at higher level.

Example − 对于一个城市,您有州 → 国家 → 地区。但是对于其他城市,您只有该州,它不属于任何国家或地区。

Example − For one city, you have state → country → Region. However for other city, you have only state and it doesn’t fall under any country or region.

Dimension with Parent-child Hierarchies

在父子层次结构中,所有成员都是同类型的。父子层次结构最常见的示例是组织中的报告结构。父子层次结构基于单个逻辑表。每一行包含两个键 - 一个用于成员,另一个用于成员的父级。

In parent-child hierarchy, all the members are of the same type. The most common example of parent-child hierarchy is the reporting structure in an organization. Parent-child hierarchy is based on a single logical table. Each row contains two keys – one for the member and another for the parent of the member.