dbTalk Databases Forums  

Product Affinity

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


Discuss Product Affinity in the microsoft.public.sqlserver.olap forum.



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

Default Product Affinity - 09-06-2004 , 04:19 PM






Hi everyone,

I'm trying to achieve a Product Affinity analysis using AS. The idea is
to determine how many times a particular product y bought with every
other one in the same transaction (or ticket). Since doing this using a
table containing all the tickets would be very expensive, I came up with
the idea of making an "Affinity fact table" that in itīs most basic form
has three fields:

1. Item
2. Analysis Item
3. Affinity Count (times bought together).

This table holds every possible combination and how many times it happened.

Now, in order to calculate a percentage of affinity (the percentage
every pair of products are bought together), I also need another metric
which is sale sales count (ticket count) for every item. So I have
another fact table called "Sales Count".

1. Item
2. Sales Count

With this two I can do % Affinity = Affinity Count / Sales Count. When I
pick a particular Analysis Item.

I was trying to make two cubes and then combine them in a Virtual Cube
so I could make this calculation but unfortunately, Whenever I filter
using my "Analysis Item" Dimension, the Sales Count has null values in
the grid even though I have my Item dimension on the rows, hence I can't
make the "% affinity" metric work.

I was thinking may be a custom rollup formula could help but I'm a bit
lost here.

Any help is appreciated. I'd be happy to extend my explanation if necesary.

Ricardo Sada

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.