乘以数量 * 计算成员中的价格

发布于 2024-11-30 19:58:28 字数 545 浏览 1 评论 0原文

我知道 MDX 用于更复杂的数学,所以请原谅过于简单的场景,但这是我的第一个计算成员之一。

当我将价格 x 数量相乘时,AS 多维数据集的数据浏览器在叶元素中具有正确的信息,但在任何父元素中都没有。原因似乎是我想要类似 (1 * 2) + (2 * 3) + (4 * 5) 而不是 (7 * 10) 的东西,我认为这是由于在列上完成求和的结果。

IsLeaf 表达式是否打算在这些情况下使用?或者还有别的办法吗?如果是这样,有没有我能看到的这么简单的例子?

我尝试创建的这个计算成员就是这样的:

[Measures].[Price]*[Measures].[Quantity]

特定行项目(叶子)的结果是正确的。但比如说,整个四月份的结果是一个令人难以置信的高数字。 在此处输入图像描述

编辑: 我现在考虑这可能是关于不良数据的问题。如果有人能够确认上述计算的成员在正常情况下应该工作,那将会很有帮助。

I know MDX is used for much more sophisticated math, so please forgive the simplistic scenario, but this is one of my first Calculated members.

When I multiply Price x Quantity, the AS cube's data browser has the correct information in the leaf elements, but not in any of the parents. The reason seems to be that I want something like (1 * 2) + (2 * 3) + (4 * 5) and not (7 * 10) which think I am getting as a result of how the Sum is done on columns.

Is the IsLeaf expression intended to be used in these circumstances? Or is there another way? If so, are there any examples as simple as this I can see?

This Calculated member that I tried to create is just this:

[Measures].[Price]*[Measures].[Quantity]

The result for a particular line item (the leaf) is correct. But the results for, say, all of april, is an incredibly high number.
enter image description here

Edit:
I am now considering that this might be an issue regarding bad data. It would be helpful though if someone could just confirm that the above calculated member should be work under normal circumstances.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回眸一笑 2024-12-07 19:58:28

这是一篇处理这个特定问题的博客文章: 使用范围分配聚合 MDX 计算的结果

Here it is a blog post dealing with this particular problem: Aggregating the Result of an MDX Calculation Using Scoped Assignments.

蔚蓝源自深海 2024-12-07 19:58:28

对于叶级计算产生的结果然后可以求和,MDX 相当复杂且缓慢。
实现您想要实现的目标的最简单方法是根据数据源视图中定义的价格 x 数量计算,将其设为常规度量。

For leaf level computations resulting in something that can then be summed, MDX is rather complex and slow.
The simplest way to do what you want to achieve would be to make this a normal measure, based on the Price x Quantity calculation defined in the data source view.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文