AS2005: Looking for a good MDX formula to do this... -
03-07-2006
, 07:08 AM
Hi,
I'm looking for a good formula which return the number of customer /
products with a number of sales greater then 10.
So, "How many unique combination of customers / products with more then 10
sales we have"
The formula I'm using is not good from a performance point of view (30sec to
2min on a subset of data only!) except if I'm using a subcube (2sec with a
subcue), but I have to create this formula has a calculated measure in the
cube definition himself.
and creating a subcube in my calculate script doesn't works.
my formula:
create member measures.HighSales as
count(Filter(customers.customers.customers.members *
products.products.products.members
, measures.NbSales > 10))
this version of the formula is not better:
count(Filter(
exists(customers.customers.customers.members *
products.products.products.members)
, measures.NbSales > 10))
this one is a little better, but not top:
count(Filter(nonemptycrossjoin(customers.customers .customers.members,
products.products.products.members, {measures.nbsales},2)
, measures.NbSales > 10))
any idea?
I'll do some other tests today, but any idea is welcome :-)
Jerome. |