Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDX question

Status
Not open for further replies.

pgdar

Programmer
May 17, 2005
3
0
0
US
Hi

I am new to MDX. How do we achieve the multiple where in MDX e.g in SQL I can do

select col1, col2 from tbl1
where col1 = 10 or col1 = 20

How do I write a similar query in MDX. I know we can achieve the AND behavior but what about OR.


ALso what about NOT EQUAL TO

e.g in SQL - we can write

select col1, col2 from tbl1
where col1 NOT IN 'ABC'

so I will get rows wherever col1 != 'ABC'

I have to do something similar in MDX. How do I do this.

Any help will be highly appreciated

- PGD
 
Hi pgdar,

You have specified queries in terms of SQL queries. It would have been better if you had defined them in terms of dimesions and measures. Still I have tried to give answers of your question.

filter([VW DIM TEAM].[AGENT_HIR].[Level 01].&[0].children,[Measures].[AVAILABLE TIME]=5000 or [Measures].[AVAILABLE TIME]=5100)
will filter children of VW DIM TEAM dimension whose AVAILABLE TIME is either 5000 or 5100.

Similarly,
filter([VW DIM TEAM].[AGENT_HIR].[Level 01].&[0].children,[Measures].[AVAILABLE TIME]<>5000)
will filter children of VW DIM TEAM dimension whose AVAILABLE TIME is not 5000.

HTH..
Pratibha
 
Thanks pratibha for this. I found another way to do this too - using aggregate but this one seems easier

Thanks

- PGD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top