Database Reference
In-Depth Information
The introduction of dynamic named sets in Analysis Services 2008 improved the
situation a little, and other more advanced techniques can be used to work around
these issues, but in general named sets are less useful than you might hope. For
further reading on this subject see the following blog posts:
http://tinyurl.com/moshadsets
http://tinyurl.com/chrisdynamicsets
Using calculated members to cache numeric values
In the same way that you can avoid unnecessary re-evaluations of set expressions by
using named sets, you can also rely on the fact that the Formula Engine can (usually)
cache the result of a calculated member to avoid recalculating expressions which
return numeric values. What this means in practice is that anywhere in your code
you see an MDX expression that returns a numeric value repeated across multiple
calculations you should consider abstracting it to its own calculated member; not
only will this help performance, but it will improve the readability of your code. For
example, take the following slow query which includes two calculated measures:
WITH
MEMBER [Measures].TEST1 AS
[Measures].[Internet Sales Amount]
/
Count
(
TopPercent
(
{
[Scenario].[Scenario].&[1]
,[Scenario].[Scenario].&[2]
}*
[Account].[Account].[Account].MEMBERS*
[Date].[Date].[Date].MEMBERS
,10
,[Measures].[Amount]
)
)
MEMBER [Measures].TEST2 AS
 
Search WWH ::




Custom Search