David
David

Reputation: 1105

Use double parameter in filter MDX

I try to execute mdx in SQL Server, and I have a filter like this:

*FILTER([Dim BSC].[BSCID].CHILDREN, [Dim BSC].[BSCID].CURRENTMEMBER  = 
[Dim BSC].[BSCID].&[1] ) 

It works correctly, but now I want to execute [BSCID].&[1] and [BSCID].&[2] at the same time so I change it to

*FILTER([Dim BSC].[BSCID].CHILDREN, [Dim BSC].[BSCID].CURRENTMEMBER  = 
[Dim BSC].[BSCID].&[1,2] ) 

But it returns empty result, how can I do double parameter to filter it? Regards

I also try

*FILTER([Dim BSC].[BSCID].CHILDREN, [Dim BSC].[BSCID].CURRENTMEMBER  = 
[Dim BSC].[BSCID].&[1].&[2] )    

but still getting empty

Upvotes: 1

Views: 48

Answers (1)

whytheq
whytheq

Reputation: 35557

Why bother using FILTER, you could just use a set with the two members you are interested in:

*{ 
       [Dim BSC].[BSCID].&[1],
     [Dim BSC].[BSCID].&[2] 
  }

Upvotes: 2

Related Questions