dbTalk Databases Forums  

Weighting, sum distinct

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


Discuss Weighting, sum distinct in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
B.Molleman
 
Posts: n/a

Default Weighting, sum distinct - 09-22-2003 , 08:16 AM






Hi,

I am analyzing the data of a survey. I have data of respondents and a
weight factor for each respondent. For the measure of unweighted
respondents I can use an aggrate function "distinct count". To
calculate the weighted number of respondents, I 'll need an aggrate
function "distinct sum" but Analysis server doesn't support the
"distinct sum" function.

RespId dim1 dim2 ... dim(n) weight measure1 ... measure(m)
234 . . . 0.62 . .
234 . . . 0.62 . .
768 . . . 0.45 . .
834 . . . 1.36 . .
834 . . . 1.36 . .

unweighted #respondents = 3 ( respId's {234, 768, 834} *no
duplicates*)

weighted #respondents = 0.62 + 0.45 + 1.36 = 2.43 ( sum of weight for
{234, 768, 834} )

Is there a solution (not depending on the other dimensions) for the
unweighted #respondents measure?

Beer

Reply With Quote
  #2  
Old   
Andrej Hudoklin
 
Posts: n/a

Default Re: Weighting, sum distinct - 09-22-2003 , 08:23 AM






Hi,

my experience at analyzing data from some marketing&research surveys, where
you always have weight, is that you have to prepare your data before.
You can use distinct count, but in your case you need a group by statement.

So, I suggest that you prepare your data (fact table) in that way that you
measure are already prepared, as unweighted and weighted values.


Bye,
Andrej




"B.Molleman" <b.molleman (AT) marketresponse (DOT) nl> wrote

Quote:
Hi,

I am analyzing the data of a survey. I have data of respondents and a
weight factor for each respondent. For the measure of unweighted
respondents I can use an aggrate function "distinct count". To
calculate the weighted number of respondents, I 'll need an aggrate
function "distinct sum" but Analysis server doesn't support the
"distinct sum" function.

RespId dim1 dim2 ... dim(n) weight measure1 ... measure(m)
234 . . . 0.62 . .
234 . . . 0.62 . .
768 . . . 0.45 . .
834 . . . 1.36 . .
834 . . . 1.36 . .

unweighted #respondents = 3 ( respId's {234, 768, 834} *no
duplicates*)

weighted #respondents = 0.62 + 0.45 + 1.36 = 2.43 ( sum of weight for
{234, 768, 834} )

Is there a solution (not depending on the other dimensions) for the
unweighted #respondents measure?

Beer



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.