MDX - 如何排除 mdx 中的某些成员
我想知道如何从一个维度中排除与另一个维度中的其他成员有链接的某些成员...假设我想排除具有状态 A 或状态 B (dim_status) 的客户端 (dim_clients)。 我知道如何交叉连接两个维度来获取这些客户端,但我不知道如何将它们从我的计算中排除,因为 EXCEPT 函数接受来自相同维度的两个集合,但我想要排除的那些是交叉连接操作的结果,我不能使用 except 函数,
我想要这样的东西:
SELECT Measure.MyMeasure ON 0
FROM MyCUBE
WHERE
EXCEPT([DIM CLIENTS].[Clients], [EXCLUDED CLIENTS])
谢谢
i'm wondering how to exclude certain members from one dimension that have links with other members from another dimension ... let's say i want to exclude clients (dim_clients) that have a status A OR a status B (dim_status).
I know how to crossjoin the two dimensions to obtain those clients but i can't figure out how to exclude them from my calculation since the EXCEPT function accepts two sets from same dimensionality but the ones i want to exclude are the result of a crossjoin operation, i can't use the except function
i want something like this :
SELECT Measure.MyMeasure ON 0
FROM MyCUBE
WHERE
EXCEPT([DIM CLIENTS].[Clients], [EXCLUDED CLIENTS])
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不太确定
[Clients]
是什么。不过我会使用会员。I am not too sure what
[Clients]
is. I would use Members though.您可以使用 Extract() 函数获取排除的客户端集具有正确的维度:
注意一元运算符来执行 except 操作。
You can use the Extract() function to get the set of excluded clients with the right dimensionality:
Note the unary operator to perform the except operation.