dbTalk Databases Forums  

Count Distinct Values in Fact Table

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


Discuss Count Distinct Values in Fact Table in the microsoft.public.sqlserver.olap forum.



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

Default Count Distinct Values in Fact Table - 10-16-2003 , 01:18 PM







I have integer values in my fact table that repeat several time. I want
to be able to count the distinct values and recalculate depending on
what dimension I pull in. I have tried various things in the calculated
member builder like Distinct([Measures].[Inforce Policy Id]). This
returns an error.



In my fact table, if I have 4 5678 values, and 3 9687 values, I want 2
as the count, not 7 or the sum of 15,365.



Any help or guidance would be appreciated!



Thanks,



Doug


--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
dpuri
 
Posts: n/a

Default Re: Count Distinct Values in Fact Table - 10-16-2003 , 11:23 PM






Define a Measure on the fact table field with the integer value, using
Aggregation Function "Distinct Count" (only one such Distinct Count
measure can be defined in a given cube).

- Deepak

*** 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.