Calculated member behaviour? -
09-04-2006
, 04:36 AM
I am having trouble understanding how a calculated member (on a
non-measure dimension) intersects with other hierarchies on the same
dimension.
A good example of this is dates.
If I have a calculated member to set the [Date].[Month of Year], then
does this create a meaningful crossjoin with [Date].[Date].
I would like to have a dynamically calculated [Date].[Month of
Year].[CurrentPeriod] and have reports where I can easily enumerate the
dates in that period, just as if I had referenced the month by name or
key.
I have AS 2005 SP1 and the example MDX below was run in Management
Studio against the AdventureWorks database.
The query as written works very slowly and generates a row for *every*
date in the database.
If I take away the curly braces from the slicer it works fine!
If I use strtomember in the calculated member definition the it goes
bad again.
Can someone *please* explain what is going on.
-----------------
WITH
MEMBER [Date].[Month of Year].[CurrentP1] AS
Aggregate([Date].[Month of Year].&[9])
SELECT {[Measures].[Sales Amount]} ON 0,
{[Date].[Date].[All Periods].children} ON 1
FROM [Adventure Works]
WHERE {([Date].[Month of Year].[CurrentP1])} |