English 中文(简体)
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.





相关问题
When is data erased from the OLAP DB?

I am new to OLAP. I understand the table structure and ETL process. I don t understand when data is supposed to be deleted from the fact table. Say I m creating a reporting application for events. ...

IIS 6.0 Application Pool Identity Being Ignored

I am using IIS 6.0 on Windows 2003 in a workgroup, and have created a web which runs in its own pool to connect to a Sqlserver 2005 Analysis Services database using msmdpump.dll. I have set the pool ...

Any scalable OLAP database (web app scale)?

I have an application that requires analytics for different level of aggregation, and that s the OLAP workload. I want to update my database pretty frequently as well. e.g., here is what my update ...

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]....

trouble connecting Excel to Analysis Services server

We have an SSAS server with a cube deployed on a server over the WAN.. We are trying to connect to the cube from Excel on various client workstations. The server is not on a domain with the clients. ...

Cant connect to analysis services via excel

I have an analysis services cube in SQL server 2005 which I m connecting to via an excel front end. When I connect via one user its fine, but when I log on to the same machine as another user I get ...

Dimension Security in OLAP Cubes

I have defined dimension security in my OLAP cube by creating roles and assigning users to each roles. Each user in a role can only see the location they belong to. When I browse the cube using a ...

热门标签