dbTalk Databases Forums  

MDX Question - Please Help

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


Discuss MDX Question - Please Help in the microsoft.public.sqlserver.olap forum.



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

Default MDX Question - Please Help - 12-22-2004 , 08:24 AM






Hi,

My fact table has sales data down to transaction detail. Each
transaction can have multiple records. Each store can have multiple
transaction.
I want to get Transaction Count and Store Count. Since I cannot use two
distinct count in CUBES, please help me with MDX for calculated members.

Thanks in advance



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

Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: MDX Question - Please Help - 12-22-2004 , 08:55 AM






You can create separate cubes for each distinct count measure, and then bring
them together in a virtual cube.
HTH,
Brian
www.geocities.com/brianaltmann/olap.html

"Master" wrote:

Quote:
Hi,

My fact table has sales data down to transaction detail. Each
transaction can have multiple records. Each store can have multiple
transaction.
I want to get Transaction Count and Store Count. Since I cannot use two
distinct count in CUBES, please help me with MDX for calculated members.

Thanks in advance



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


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

Default RE: MDX Question - Please Help - 12-22-2004 , 09:31 AM



Brian,

Thanks for your response. If I can avoid creating seperate cubes I want
to do that. Sooner or later there may be another distinct count measure
they may want.

Is there any way I could acheive this using member custom rollup or
using MDX to count at higher level in hierarchy?

Thank you


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

Reply With Quote
  #4  
Old   
Brian Altmann
 
Posts: n/a

Default RE: MDX Question - Please Help - 12-22-2004 , 09:53 AM



Once you have loaded aggregated data into a cube there is no way for MDX to
perform a distinct count.
You would have to have a transaction dimension, with a member for every
transaction, or create a fact table with pre-calculated measures to do that.
It is much easier to build and mantain cubes for each distinct count
measure. Performance is good too. You can add additional cubes for new
measures if necessary.

From BOL(Using Aggregate functions):

Because distinct count measures are nonadditive, the presence of a distinct
count measure significantly restricts the ability of Microsoft® SQL Server™
2000 Analysis Services to preaggregate the cube. For this reason, it is
recommended that each distinct count be placed in its own cube with no other
measures. These cubes with distinct count measures can then be joined
together with other cubes in a virtual cube that efficiently manages all of
the measures.

Regards,
Brian

"Master" wrote:

Quote:
Brian,

Thanks for your response. If I can avoid creating seperate cubes I want
to do that. Sooner or later there may be another distinct count measure
they may want.

Is there any way I could acheive this using member custom rollup or
using MDX to count at higher level in hierarchy?

Thank you


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


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.