dbTalk Databases Forums  

Count Distinct

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


Discuss Count Distinct in the microsoft.public.sqlserver.olap forum.



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

Default Count Distinct - 10-31-2003 , 01:59 PM






How would I solve the following issue. Say we have a fact
table like this.

custID orderID TimeID PartID OrderQTY
1 2000 300 X1 25
1 2000 300 X2 10
1 2005 350 X1 18

Would could I count the Distinct number of order id's for
a customer given the data above for the given time
period? As well as is there a way to count the total
number of items per distinct orderID. Would creating MDX
sets help me here?

-mike

Reply With Quote
  #2  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default RE: Count Distinct - 11-01-2003 , 02:31 AM






Hello Mike,

We would appreciate your patience while we are looking into this issue. We
will post our response at soon as I have update for you.

Thanks for posting to MSDN Managed Newsgroup.

Thank you,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights


Reply With Quote
  #3  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default RE: Count Distinct - 11-03-2003 , 03:14 AM



Hi Mike,

Based on my research, you can try to create three dimensions (CustID,
ordereId and TimeID) and the related measures to meet your requirements. In
the measure property, please choose "distinct count" in the Aggregation
Function box under the Basic tab to count the distinct number.

For additional information regarding this issue, please refer to the
following article on SQL Server Books Online.
Topic: "Dimension Wizard"
Topic: "Measures"

Please feel free to post in the group if this solves your problem or if you
would like further assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


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.