dbTalk Databases Forums  

Re: mdx count problem

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


Discuss Re: mdx count problem in the microsoft.public.sqlserver.olap forum.



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

Default Re: mdx count problem - 09-21-2004 , 09:34 PM






Could you provide some sample data and results, to better illustrate
what you're trying to do?


- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Matthias Englert
 
Posts: n/a

Default Re: mdx count problem - 09-22-2004 , 02:17 AM






Thanks for your help, I already found a solution! Code will be posted
later...

"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> schrieb im Newsbeitrag
news:uwrAvyEoEHA.3460 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Quote:
Could you provide some sample data and results, to better illustrate
what you're trying to do?


- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #3  
Old   
Matthias
 
Posts: n/a

Default Re: mdx count problem - 09-24-2004 , 10:47 AM



Hi,

here the MDX I found to calculate what I need:

with set mytime as
'[time].[month1] : [time].[month09]'

member Measures.vol_sum as
'Sum( {[time].[month1] : time.currentmember}, Measures.Volume) '

member Measures.count_stores_sum as
' filter([stores].members, Measures.vol_sum > 0).count'

select
mytime on columns,
measures.count_stores on rows
from theCube

Regards,
Matthias

"Bernardo Brugal" <berrnardo.brugal (AT) gmx (DOT) de> schrieb im Newsbeitrag
newsv80l0taaljpb26dvlo98t0jfup6q0q1c9 (AT) 4ax (DOT) com...
Quote:
Hi folks!

I have a cube with a store dimension where I need to know the number
of stores, that have sold a certain product SO FAR.
with the following mdx I get the count of stores, that sold in the
current period:

with set mytime as
'nonemptycrossjoin( time.[week].members)'

member [Measures].[Count] as

' filter(([store].[store_level].members), (measures.volume)
0).count'

select

{mytime} on columns,
{measures.test} on rows

from [myCube]

where
(
[Product].[myProduct]
)


In addition I want to know now for each period the number of stores
that have sold since period1 (in period2 I need to know the number of
stores that sold in period1 but not in period2 anymore plus those who
sold in period2).

Has anyone an idea hwo to solve this problem?

Thanks

Bernardo
--
Gott sei Dank bin ich Atheist. [Luis Buñuel]



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.