Microsoft KB Archive/928318

From BetaArchive Wiki
Knowledge Base


Error message when you run an MDX query in SQL Server 2005 Analysis Services: "The MDX function CURRENTMEMBER failed because the coordinate for the 'AttributeName' attribute contains a set"

Article ID: 928318

Article Last Modified on 11/17/2006



APPLIES TO

  • Microsoft SQL Server 2005 Analysis Services



SYMPTOMS

When you run a Multidimensional Expressions (MDX) query in Microsoft SQL Server 2005 Analysis Services, you receive the following error message:

The MDX function CURRENTMEMBER failed because the coordinate for the 'AttributeName' attribute contains a set.

This issue occurs if the following conditions are true:

  • You run an MDX query against a semiadditive measure. The MDX query contains the Aggregate function.
  • In the first parameter of the Aggregate function, you try to sum an MDX set that is returned from the Crossjoin function.
  • In the Crossjoin function, you use the CurrentMember function to return the current member.
  • In the second parameter of the Aggregate function, you use the CurrentMember function to reference an MDX set.


CAUSE

This issue occurs because the CurrentMember function that is referenced in the second parameter of the Aggregate function cannot return the current members.

Assume that you specify a numeric expression for the second parameter of the Aggregate function. In this case, the CurrentMember function that is referenced in this second parameter receives its context from the MDX set that is specified in the first parameter of the Aggregate function. Assume that the MDX set that is specified in the first parameter also uses the CurrentMember function to reference an MDX set. In this case, the CurrentMember function that is referenced in the second parameter cannot return the current members.

RESOLUTION

To work around this issue, use a single specific member instead of using the CurrentMember function in the first parameter of the Aggregate function.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce this problem

  1. Open SQL Server Management Studio, and then connect to an instance of SQL Server 2005 Analysis Services that has Adventure Works sample database installed.
  2. Run the following MDX query against the Adventure Works cube.

    WITH 
        MEMBER 
            [Organization].[Organizations].[ReproMember] AS ' 
            AGGREGATE( 
                CROSSJOIN( 
                    {[Organization].[Currency Code].CURRENTMEMBER}, 
                    {[Organization].[Organizations].MEMBERS}), 
                [Organization].[Organizations].CURRENTMEMBER)'
    SELECT 
        [Organization].[Currency Code].[Currency Code].MEMBERS 
        ON AXIS(0), 
            [Organization].[Organizations].[ReproMember]
        ON AXIS(1) 
    FROM 
        [Adventure Works] 
        where [Measures].[Amount]

The error message that is mentioned in the "Symptoms" section is returned in the result set.

Keywords: kbexpertiseadvanced kbtshoot kbsql2005as kbprb KB928318