dbTalk Databases Forums  

QTD Funtion --Specific intersection

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


Discuss QTD Funtion --Specific intersection in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
aralew@gmail.com
 
Posts: n/a

Default QTD Funtion --Specific intersection - 01-06-2006 , 04:55 PM






Hi:

I have a little problem with the QTD function. How can I specific a
intersection's measure

E.g. I need to find the QTD unit for apple

I use this MDX express and it does not like it
sum(QTD([Time].currentmember), [Product].&[Apple],[Measures].[Units])

Please help

Thanks
Arale


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

Default Re: QTD Funtion --Specific intersection - 01-07-2006 , 10:03 PM






The problem seems to be in the Sum() function, which can't have 3
arguments:

http://msdn2.microsoft.com/en-us/lib...S,SQL.90).aspx
Quote:
Sum (MDX)

Returns the sum of a numeric expression evaluated over a set.

Syntax

Sum( Set_Expression [ , Numeric_Expression ] )
...
Quote:

So try this instead:

Sum(QTD([Time].currentmember),
([Product].&[Apple],[Measures].[Units]))


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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


Reply With Quote
  #3  
Old   
Vladimir Chtepa
 
Posts: n/a

Default Re: QTD Funtion --Specific intersection - 01-08-2006 , 07:08 AM



Hi,

You should write

sum(QTD([Time].currentmember), ([Product].&[Apple],[Measures].[Units]))

Vladimir Chtepa

<aralew (AT) gmail (DOT) com> wrote

Quote:
Hi:

I have a little problem with the QTD function. How can I specific a
intersection's measure

E.g. I need to find the QTD unit for apple

I use this MDX express and it does not like it
sum(QTD([Time].currentmember), [Product].&[Apple],[Measures].[Units])

Please help

Thanks
Arale




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.