Microsoft Sqlserver MDX

spsun
spsun used Ask the Experts™
on
Hello Experts,
Can you please advise me on this:

MDX query for the following  sql:

Select memberno,membername,lineofbusiness
where lineofbusiness in (1,2) and lineofbusiness  in (3);

Members who are active in (1 or 2) and 3
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Let me give you an example in AdventureWorks, and you can translate (hopefully).

This gets customers who have bought products from categories (1 or 4) and 3.


SELECT
{
[Product].[Category].&[1], [Product].[Category].&[4], [Product].[Category].&[3]
} ON Columns,

Filter(
        Customer.Customer.Customer.Members
      , (
        (Measures.[Internet Sales Amount], [Product].[Category].&[1]) > 0
        OR
        (Measures.[Internet Sales Amount], [Product].[Category].&[4]) > 0
        )
        AND
        (Measures.[Internet Sales Amount], [Product].[Category].&[3]) > 0
      )
ON Rows
FROM [Adventure Works]
WHERE (Measures.[Internet Sales Amount])

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial