MDX performace -- Lookup cube recursion -
04-12-2005
, 10:16 AM
All,
I have a preformance problem with a calculated measure. It is when
implenting currency conversion. The conversion is based on EUR rates
for the given location.
The dimension under question are 2 dimensions.
ReportingHierarchy ==> 6 levels (bottom level is portfolio)
COB ==> 3 level (bottom level is Day)
I do a lookup cube to get Fx conversion rate to EUR from my rates cube
and multiply that with another measure to get the EUR equivalent.
Following is the MDX for that. The results are fine but it is terribly
slow when I run ar the top level of ReportingHierarchy and Cob. Is
there any way of making this faster ?
Thanks in Advance...
IIF( Cob.CurrentMember.Level IS [Day] ,
IIF( ReportingHierarchy.CurrentMember.Level IS
[ReportingHierarchy].[Portfolio],
LookupCube ("Rates", "( [Currency].[CurrencyCode].&[EUR],
[Cob].[Day].&[" + Cob.CurrentMember.properties("Key") + "],
[Location].[LocationName].&" +
Ancestor([ReportingHierarchy].CurrentMember,[ReportingHierarchy].[Location]).Properties("Location
Code") + ")" )
* Measures.[Dly Value Lfc]
,SUM
(Descendants(ReportingHierarchy.CurrentMember,[ReportingHierarchy].[Portfolio]),
Measures.[Dly Eur])
) ,
SUM(Descendants(Cob.CurrentMember,[Day]), Measures.[Dly Eur])
) |