查找成员是否为IsMemberOf的MDX函数 [英] MDX function to find if a Member IsMemberOf a set

查看:63
本文介绍了查找成员是否为IsMemberOf的MDX函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个非常基本的问题,因为这是我正在寻找的非常基本的功能.

This feels like a really basic question, because it's a really basic function I'm looking for.

我知道您可以这样做:

([Dimension].CurrentMember IS [Dimension].[AParticularMember])

您将得到逻辑1或0作为函数值.

and you get a logical 1 or 0 as the function value.

但是您如何做这种事情,而又不将IS函数连接到很多难看的OR中:

But how do you do this kind of thing, without concatenating IS functions in a whole lot of ugly ORs:

([Dimension].CurrentMember ISAMEMBEROF 
     {[Dimension].[AMember],[Dimension].[AnotherMember],[Dimension].[YetAnotherMember]}
)

?

这实际上是基本的集合操作,仅在一维上,但我只是找不到能做到这一点的该死的函数.我试过了:

This is really basic set operations, in one dimension only, but I just can't find the damn function that does it. I tried this:

NOT(ISEMPTY(INTERSECT([Dimension].CurrentMember,
{[Dimension].[AMember],[Dimension].[AnotherMember],[Dimension].[YetAnotherMember]})))

,但它为每个维度成员返回True.我猜这是因为进入ISEMPTY函数的不是维成员,而是元组

but it returned True for every dimension member. I'm guessing this is because what is going into the ISEMPTY function is not the dimension member, but the tuple

([Dimension].CurrentMember,[AnotherDimension].DefaultMember,  
[YetAnotherDimension].DefaultMember,... ,Measures.DefaultMember)

我要寻找的功能是否存在于MDX中?

does the kind of function I'm looking for exist in MDX?

推荐答案

您很亲密:

INTERSECT([Dimension].CurrentMember,
{[Dimension].[AMember],[Dimension].[AnotherMember],[Dimension].[YetAnotherMember]}).Count > 0

这篇关于查找成员是否为IsMemberOf的MDX函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆