Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLAP Campaign Management Solution.

Status
Not open for further replies.

aksm47

Programmer
Apr 2, 2004
6
US
Personally, I need to create an OLAP solution for Campaign Management.

For example:

Group 1: I need to select a group of people who buy Apple

Group 2: I need to select a group of people who buy Orange.


If John Smith bought Apple and Orange, he should only exists in Group 1.

My question is how can I suppress data in Group 2 to ensure No one is in Group 1? It is very straight forward to use (NOT EXISTS) in Relational Database, but how can I do it in terms of OLAP? All I need is the COUNT.


Any inputs will be great.

Thank you very much for your help in advance.
 
One method of doing this is to have an indicator for Apple and an indicator for Orange. The indicator for Apple can be a 0 or a 1. The indicator for Orange can be a 0 or a 2. Then create a column called AppleOrange which is the sum of Apple and Orange. Then do some counting. When AppleOrange = 0, then neither, = 1 then Apple Only, = 2 then Orange Only, =3 then both.

Old technique. Perhaps helpful?

BTW, if you added another one, say Banana, it would be 0 or 4 (NOT 3). This is a base-2/binary technique.

-------------------------
The reasonable man adapts himself to the world. The unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. - George Bernard Shaw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top