Well,
I ended up splitting out three different tables using SQL, one for each
period. Then, I loaded the tables with the User Keys and the other data.
It gets messier. The client also wants spend banding, wherein each grouping
of customer purchases falls within a given range.
So the table for Period One contains:
A. User Surrogate Key - One for Each Customer that meets the period spend
pattern criteria.
B. Aggregate Purchases Per Customer that are within the given period.
C. A series of BOOLEAN columns for the Spend Banding, like this:
Spent 100 - 150?
Spent 160 - 200?
Spent 250 - 300?
Spent 300 - 400?
Spent 400 - 500?
Spent 500 or More?
D. A language code (this is Texas, Seņor), like this: ENG, SPN, HBW, POL,
CRE.
E. A State code (NV, TX, NM, CA ...)
F. A Value Card Tier (VODKA, WINE, BEER), where the Big Spenders are VODKA.
G.
Here's a couple of sample records:
23445 369.95 0 0 0 1 0 0 ENG TX VODKA
23445 369.95 0 0 0 1 0 0 ENG TX VODKA
23445 369.95 0 0 0 1 0 0 ENG TX VODKA
23445 369.95 0 0 0 1 0 0 ENG TX VODKA
I am going to treat them as dimensions.
"Darren Gosbell" <xxx (AT) xxx (DOT) com> wrote
Quote:
I can't quite put my finger on it... Is there some linkage between the
dates and the customers? Your example of the table with start and end
dates does not seem to contain enough information. (If I am
understanding things correctly)
I would have thought that the start date for the discount could have
been stored as a member property against the customer. Then you could do
a distinct count and sum, using the member property as the start of the
date range.
--
Regards
Darren Gosbell [MCSD]
dgosbell_at_yahoo_dot_com
Blog: http://www.geekswithblogs.net/darrengosbell |