3

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

I know you can do this:

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

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

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]})))

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)

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

whytheq
  • 34,466
  • 65
  • 172
  • 267
SebTHU
  • 1,385
  • 2
  • 11
  • 22

1 Answers1

5

You were close:

INTERSECT([Dimension].CurrentMember,
{[Dimension].[AMember],[Dimension].[AnotherMember],[Dimension].[YetAnotherMember]}).Count > 0
GregGalloway
  • 11,355
  • 3
  • 16
  • 47