dbTalk Databases Forums  

AS2005: Looking for a good MDX formula to do this...

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


Discuss AS2005: Looking for a good MDX formula to do this... in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jéjé
 
Posts: n/a

Default 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.



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.