I have an MDX statement that generates an error that I don't understand. I've tried running a corresponding statement on the Adventure Works DW 2008R2 SE cube and am getting the same error message again. The statement is the following:
with member [Measures].[Internet Gross Margin] as
[Measures].[Internet Sales Amount] - [Measures].[Internet Total Product Cost]
select
{
[Measures].[Internet Sales Amount]
,[Measures].[Internet Total Product Cost]
,[Measures].[Internet Gross Margin]
}
on 0,
non empty
[Product].[Product].members
*
[Product].[Model Name].members
on 1
from
(
select
[Product].[Model Name].&[Classic Vest]
on 0
from [Adventure Works]
)
The error I get is: The MDX function failed because the coordinate for the Model Name attribute contains a set.
Omitting the [Measures].[Internet Gross Margin] from the selected columns or selecting from the cube directly instead of from a sub-cube doesn't result in the error.
I'm working on Windows Server 2008 R2 Standard with the following components:
Microsoft SQL Server Management Studio 10.50.4000.0
Microsoft Analysis Services Client Tools 10.50.4000.0
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML 3.0 5.0 6.0
Microsoft Internet Explorer 9.0.8112.16421
Microsoft .NET Framework 2.0.50727.5472
Can anybody explain what causes the problem?
many thanks