开发者

MDX Calculated Member CrossJoin question

I have an MDX query with the following 开发者_如何转开发calculated member:

with member [Measures].[BBOX] as
Count(
    Filter(
        CrossJoin([Dim Response].[Response ID].Children, [Dim Question].[Question Text].Children),
        [Measures].[Question Bottom Box] > 0
    )
)

The idea is that I want a count of the combinations of two members of a dimension. (Forgive me if my MDX vocabulary is a little off). It is also based on some criteria.

The rest of the query looks like this:

select 
{({[Measures].[TBOX], [Measures].[BBOX]}, 
[Dim Product].[Category Name].&[Office])} on columns,
{[Dim Question].[Question Text].Members} on rows 
from H1_FY10_Revised
where ({[Dim Question].[Category Name].&[Partner]}, 
{[Dim Subsidiary].[Subsidiary Alias Name].&[Germany]})

My question is: does the slicing of data that occurs in the main query (the where clause) translate to the calculated member? Is there any sort of implicit join between the data that comes back from the calculated member and the axises in the main query?

Or another way to phrase it: does the cross join in the calculated member execute in the context of the main query?


The evaluation of the CrossJoin does not depend on the context, but the Filter function does.

Calculated members are evaluated in the context of the query bu your calculated member may have a constant value because:

  • [Dim Response].[Response ID].Children is equivalent to [Dim Response].[Response ID].DefaultMember.Children (see MSDN).
  • [Dim Question].[Question Text].Children is equivalent to [Dim Question].[Question Text].DefaultMember.Children

So the result of the CrossJoin does not depend on the slicer. Only the value of [Measures].[Question Bottom Box] will depend on the slicer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜