dbTalk Databases Forums  

AS2005 Mdx Script Aggregation Behaviour

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


Discuss AS2005 Mdx Script Aggregation Behaviour in the microsoft.public.sqlserver.olap forum.



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

Default AS2005 Mdx Script Aggregation Behaviour - 07-26-2006 , 08:45 AM






Hi All!

In my Sales Cube I have planning Data on a monthly level
written into the first date of the month, e.g.:
Date sales Plan
===================
March 06 10.000
- 03/01/06 10.000
- 03/02/06 0
...
- 03/31/06 0

April 06 12.000
- 04/01/06 12.000
- 04/02/06 0
...
- 04/30/06 0

Now I want to disaggregate this data to each single date, weighted
by the count of delivery days of the month. So I'm doing
something like:
(Note: member property IsDevDay contains 1 if yes, 0 otherwise)

CALCULATE;

scope ( {MEASURES.Amount, MEASURES.Value },
{[Date].[year-month].[date]} ,
{ [type].[type].&[P]} ) ;

this = [Date].[year-month].currentmember.parent

/ sum( [Date].[year-month].currentmember.parent.children,
[Date].[year-month].Properties( "IsDevDay", typed ))
* [Date].[year-month].Properties( "IsDevDay", typed );

end scope;

Even though it works, it leads to pretty poor cube performance,
if I use queries on aggregated date levels like month
and year. What I want is, that the
calculation is only performed on the date level and that
preaggregated data is used on higher levels.
Any Ideas ?

Thanks

Peter


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.