如何通过olap立方体中的过滤字段进行过滤聚合?
目前,我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将维度 [STATUS] 添加到包含成员 [X] 和 [Y] 的多维数据集。这可能是一个隐藏的维度。添加 [金额] 作为度量并隐藏此度量。
然后,将 2 个计算出的度量添加到您的多维数据集中:
[Measures].[Payment],使用 MDX 表达式:
以及 [Measures].[Winners] 作为
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:
And [Measures].[Winners] as