如何通过olap立方体中的过滤字段进行过滤聚合?

发布于 2024-10-05 04:47:30 字数 267 浏览 0 评论 0原文

目前,我在 SQL DB 表中有一个名为“金额”的字段。该字段将在 Reporting Services 报告中使用,该报告使用 SSAS OLAP Cube 来显示获奖者和付款。报告的付款栏必须使用此字段(我的意思是金额),已过滤 按状态 X,列获奖者必须使用按状态 Y 过滤的此字段(金额也是)。 如何在多维数据集中执行此操作,以使用两列中表示的相同度量并过滤其值?

我尝试使用度量表达式,但我不知道这个技巧是否有帮助。我也听说过计算措施,但不知道它是如何运作的。

有什么想法吗?

Currently I have one field in a SQL DB table called Amount. This field will be used in a Reporting Services report that uses SSAS OLAP Cube behind to display the winners and the payments. The column payment of the report must use this field (I mean Amount), filtered
by the status X and the column winners must use this field (Amount too) filtered by status Y.
How can I do this in the cube to use the same measure represented in two columns with their values filtered?

I tried to use the measure expressions but I don't know if this trick could help. I also heard about calculated measures but don't know how it works.

Any ideas?

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

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

发布评论

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

评论(1

转角预定愛 2024-10-12 04:47:30

将维度 [STATUS] 添加到包含成员 [X] 和 [Y] 的多维数据集。这可能是一个隐藏的维度。添加 [金额] 作为度量并隐藏此度量。

然后,将 2 个计算出的度量添加到您的多维数据集中:

[Measures].[Payment],使用 MDX 表达式:

([Status].[Status].[X], [Measures].[Amount])

以及 [Measures].[Winners] 作为

([Status].[Status].[Y], [Measures].[Amount])

Add a dimension [STATUS] to your cube containing the members [X] and [Y]. This can be a hidden dimension. Add [Amount] as a measure and hide this measure also.

Then, add 2 calculated measures to your cube:

[Measures].[Payment] with MDX expression:

([Status].[Status].[X], [Measures].[Amount])

And [Measures].[Winners] as

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