dbTalk Databases Forums  

Distinct Count error

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


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



Reply
 
Thread Tools Display Modes
  #1  
Old   
stuart rielly via SQLMonster.com
 
Posts: n/a

Default Distinct Count error - 02-18-2005 , 05:40 AM






Is there any special setting to be set while using distinct count as the
measure aggregate?
I just need a simple distinct count across all dimensions.

The fact table
for_key1, for_key2, for_key3, measurecolumn

dim1
p_key1

dim2
p_key2

dim3
p_key3

all the dims have varying number of levels and the measure needs to be
distinct count at all levels.

tia

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Distinct Count error - 02-20-2005 , 11:26 AM






what do you want to count?
"number of product" ? "number of customers" ? both (and maybe other)?
you have to provide 1 measure by dimension to count number of products is 1
measure, number of customers another measure etc...

after, you can create 1 cube by DCount measure and then a virtual cube to
give access to all DCount measures at the same time.
Or you can create a dynamic DCount measure instead-of the DCount aggregates
measure.
count(crossjoin(descendants(customers.currentmembe r, customers.Name),
{measures.dummymeasure}), excludeempty)


"stuart rielly via SQLMonster.com" <forum (AT) SQLMonster (DOT) com> wrote

Quote:
Is there any special setting to be set while using distinct count as the
measure aggregate?
I just need a simple distinct count across all dimensions.

The fact table
for_key1, for_key2, for_key3, measurecolumn

dim1
p_key1

dim2
p_key2

dim3
p_key3

all the dims have varying number of levels and the measure needs to be
distinct count at all levels.

tia

--
Message posted via http://www.sqlmonster.com



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.