简单 MDX 计算成员
在我的简单多维数据集中,我有一个度量 = \[Measure\].\[Salary\]
,我还有 \[DimEmployee\].\[EmployeeLastName\].\[Smith \].
我想创建计算的度量,我可以在轴 0 中显示两个度量 - \[Measure\].\[Salary\]
和计算的度量\[Measure\].\[SmithsSalaries\]
,比较 Smith 的收入与总工资之间的差异。
我想将 Measure.SmithSalaries 与所有维度的其他度量进行比较。是否可以使用 SCOPE 语句创建这样的度量?
我正在玩 SCOPE 语句,但只有选择 DimEmployee 时它才会显示结果。我正在寻找以块的形式运行的东西以避免性能问题。
In my simple cube, I have a measure = \[Measure\].\[Salary\]
, I have also \[DimEmpployee\].\[EmployeeLastName\].\[Smith\].
I would like to create calculated measure, where I can display in Axis 0 two measures - \[Measure\].\[Salary\]
and calculated measure \[Measure\].\[SmithsSalaries\]
, to compare difference between Smith's earnings vs Total Salary.
I would like to compare Measure.SmithSalaries with other measures accross all diemensions. Is it possible to create such a measure using SCOPE statement?
I was playing around SCOPE statements, but it was displaying results only if DimEmployee was selected. I am looking for something which is running in blocks to avoid performance issues.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你只需要一个简单的计算测量。
之后,您可以将其与您的总工资相结合以获得比率。
SCOPE 允许您在不同的 Dimension 组合发挥作用时具有不同的行为,例如在选择 DimEmployee 时返回不同的计算,但在其他情况下仅返回正常的计算。就像一个非常有效的 IF 条件来检查此计算的轴中的内容。
I think you only need a simple calculated measure.
After that you can combine that with you total salary for example to get a ratio.
SCOPE allows you to have different behaviors when different combinations of Dimensions are into play, like returning a different calculation when the DimEmployee is selected but otherwise just return the normal calculation. Like a Very efficient IF condition to check what are in the Axis of this calculation.