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 |