如何在 MDX 中过滤度量
我需要过滤测量值,因为
MeasureA MeasureB
10 10
15 15
5 20
20 20
这里我只需要得到不相等的测量值,我使用过滤功能作为但不起作用
选择过滤器({[测量].[A], [措施].[B]}, ([措施].[A]- [措施].[B])=0) 上 0 来自[立方体]
预期结果集
MeasureA MeasureB
5 20
我错过了什么?
I need to filter the measure values as
MeasureA MeasureB
10 10
15 15
5 20
20 20
Here I need to get only the measures are not equal, I am using filter function as but not working
Select Filter({[Measures].[A],
[Measures].[B]},
([Measures].[A]-
[Measures].[B])=0)
on 0
from [Cube]
Expected result set
MeasureA MeasureB
5 20
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用维度而不是过滤器语句第一部分的度量。假设您正在查询产品,那么您的查询可能如下所示:
Try using a dimension instead of your measures for the first part of the filter statement. Assuming you are querying products then your query might look like:
您可能想要尝试在 DSV 中为此事实表创建一个计算字段...
然后您可以创建一个“事实维度”并将此计算字段作为要在查询或计算度量中使用的属性。
You might want to try creating a calculated field in the DSV for this Fact table...
Then you can create a "fact dimension" and have this calculated field as an attribute to be used in your queries or calculated measures.