dbTalk Databases Forums  

AS2005 mdx calculation error

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


Discuss AS2005 mdx calculation error in the microsoft.public.sqlserver.olap forum.



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

Default AS2005 mdx calculation error - 09-09-2010 , 08:08 AM






I want to count how many articles were sold with amount greater than zero,
related to a client, who is also related to a sales agent.

I made a new member on my cube, and until this code it works fine:

CREATE MEMBER CURRENTCUBE.[MEASURES].[NArticSell]
AS IIF([Measures].[Amount]<= 0 ,null,1),
NON_EMPTY_BEHAVIOR='[Measures].[Amount]';

([MEASURES].[NArticSell],([Dim Client].[Client].Members,[Dim Article].
[Article].[All])) =
sum(NONEMPTY(([Dim Client].[Client].CurrentMember,[Dim Article].[Article].
Members - {[Dim Article].[Article].[All]})
,[MEASURES].[NArticSell]));

If that works fine, why if I add the code above Analysis Services doesnt
respond when I query SalesAgent-Client-NArticSell?

([MEASURES].[NArticSell],([Dim SalesAgent].[Name].Members,[Dim client].
[Cliente].[All])) =
sum(NONEMPTY(([Dim SalesAgent].[Name].CurrentMember,[Dim client].[client].
Members - {[Dim client].[client].[All]})
,[MEASURES].[NArticSell]));

Thank you

url:http://www.ureader.com/gp/1154-1.aspx

Reply With Quote
  #2  
Old   
Fernando Ponte
 
Posts: n/a

Default Re: AS2005 mdx calculation error - 09-17-2010 , 08:21 AM






Hello Antonia.

What error the server respond or you don't receive any answer when
querying?

Regards.

Fernando

On Sep 9, 9:08*am, "antonia"<anto... (AT) test (DOT) es> wrote:
Quote:
I want to count how many articles were sold with amount greater than zero,
related to a client, who is also related to a sales agent.

I made a new member on my cube, and until this code it works fine:

CREATE MEMBER CURRENTCUBE.[MEASURES].[NArticSell]
AS IIF([Measures].[Amount]<= 0 ,null,1),
NON_EMPTY_BEHAVIOR='[Measures].[Amount]';

([MEASURES].[NArticSell],([Dim Client].[Client].Members,[Dim Article].
[Article].[All])) =
sum(NONEMPTY(([Dim Client].[Client].CurrentMember,[Dim Article].[Article]..
Members - {[Dim Article].[Article].[All]})
,[MEASURES].[NArticSell]));

If that works fine, why if I add the code above Analysis Services doesnt
respond when I query SalesAgent-Client-NArticSell?

([MEASURES].[NArticSell],([Dim SalesAgent].[Name].Members,[Dim client].
[Cliente].[All])) =
sum(NONEMPTY(([Dim SalesAgent].[Name].CurrentMember,[Dim client].[client]..
Members - {[Dim client].[client].[All]})
,[MEASURES].[NArticSell]));

Thank you

url:http://www.ureader.com/gp/1154-1.aspx

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.