Obiee 简明教程
OBIEE – Level-Based Measures
按级别划分的指标创建用于在特定的聚合级别执行计算。它允许通过一个单一的查询返回多个聚合级别的的数据。它还允许创建共享指标。
Level-based measures are created to perform calculation at a specific level of aggregation. They allow to return data at multiple levels of aggregation with one single query. It also allows to create share measures.
Example
让我们说有一家名为 XYZ Electronics 的公司,该公司在其销售产品的许多区域、国家和城市中。现在,公司总裁希望看到国家级别的总收入——比区域低一级,比城市高一级。因此,总收入指标应汇总到国家级别。
Let us say there is a company XYZ Electronics which sells its products in many regions, countries and cities. Now the company President wants to see the total revenue at country level - one level below region and one level above cities. So total revenue measure should be summed up to the country level.
这些类型的指标称为按级别划分的指标。类似地,您也可以对时间层次结构应用按级别划分的指标。
These type of measures are called level-based measures. Similarly, you can apply level-based measures on the time hierarchies.
一旦创建维度层次结构,就可以通过双击逻辑表中“总收入”列并在“级别”选项卡中设置级别来创建按级别划分的指标。
Once the dimension hierarchies are created, level-based measures can be created by double clicking on the total revenue column in the logical table and setting the level in the levels tab.
Create Level-Based Measures
在脱机模式下打开存储库。转到文件 → 打开 → 脱机。
Open the repository in offline mode. Go to File → Open → Offline.
选择 .rpd 文件并单击打开 → 输入存储库密码并单击确定。
Select .rpd file and click open → Enter repository password and click Ok.
在 BMM 层中,右键单击“总收入”列 → 新对象 → 逻辑列。
In BMM layer, right-click on Total Revenue column → New Object → Logical column.
它将打开逻辑列对话框。输入逻辑列名称“总收入”。转到“列源”选项卡 → 选中“使用表达式从现有列导出”。
It will open the logical column dialog box. Enter the name of logical column total revenue. Go to column source tab → Check derived from existing columns using an expression.
一旦您选择此选项,表达式编辑向导将被高亮显示。在表达式生成器向导中,从左侧菜单中选择逻辑表 → 列名 → 总收入 → 单击确定。
Once you select this option, expression edit wizard will be highlighted. In expression builder wizard, select the logical table → Column name → Total revenue from the left side menu → Click OK.
现在转到逻辑列对话框的“级别”选项卡 → 单击逻辑维度以将其选作逻辑级别下的总计。这指定应在维度层次结构中的总计级别计算指标。
Now go to level tab in logical column dialog box → Click on logical dimension to select it as grand total under logical level. This specifies that the measure should be calculated at grand total level in the dimension hierarchy.
一旦您单击确定 → 总收入逻辑表将出现在逻辑维度和事实表下方。
Once you click OK → Total Revenue logical table will appear under the logical dimension and Fact tables.
此列可以拖到表示层中受众领域,以便最终用户生成报告。您可以从事实表或从逻辑维度中拖动此列。
This column can be dragged to presentation layer in the subject area to be used by end users to generate reports. You can drag this column from fact tables or from logical dimension.