dbTalk Databases Forums  

Is there Equivalence to an "OR" Clause in MDX Queries

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Is there Equivalence to an "OR" Clause in MDX Queries in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Balaji Rajaraman
 
Posts: n/a

Default Is there Equivalence to an "OR" Clause in MDX Queries - 06-20-2006 , 04:52 PM






Hai All,
I am a new member to this Group. i want to write an MDX Query with an
OR Clause.
In Detail i have a measure for counting the number of records. the
requirment is to view the measure in 2 different dimension say one
dimension is Date and the other dimension is Types. Now i have to look
for a measure which is particular for a date (or) the dimension lies
with one particular type. If i pull the dimension of date and choose a
particular date then those records which are satisfied for that date is
displayed. If i pull dimension type and then view the measure it is
displaying. if i want to view those records which are present for a
particular date or a particular type i am not able to view because if i
drag and drop it auomatically takes and clause.


Please help me out !!!!!!
Thanks in Advance....


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Is there Equivalence to an "OR" Clause in MDX Queries - 06-20-2006 , 09:18 PM






Here's an example Adventure Works query, which returns [Order Quantity]
when either the Date is "Jul 31, 2001" (= 5) or the Product Name is
"Road-150 Red, 44" (= 437). Note that the total is 441, not 442, because
[Order Quantity] = 1 when both conditions apply, so this should not be
double-counted.

Quote:
select {[Measures].[Order Quantity]} on 0
from [Adventure Works]
where {([Date].[Calendar].[Date].&[31],
[Product].[Product Categories].[All Products]),
([Date].[Calendar].[All Periods],
[Product].[Product Categories].[Product Name].&[311])}
------------------------------------------------------
Order Quantity
441
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.