Hello
I've got a problem with a MDX-statement on SSAS 2008.
To describe the problem, I have created an equivalent MDX query for Adventure Work database:
with member [Measures].[SalesMinusTax] as
[Measures].[Internet Sales Amount] - [Measures].[Internet Tax Amount]
select
{
[Measures].[Internet Sales Amount]
,[Measures].[Internet Tax Amount]
,[Measures].[SalesMinusTax]
}
on 0,
non empty
[Product].[Product].members
*
[Product].[Model Name].members
on 1
from
(
select
[Product].[Model Name].&[All-Purpose Bike Stand]
on 0
from [Adventure Works]
)
--> Exception
This query returns an error message which is (on my machine) unfortunately in german:
"Fehler bei der MDX-Funktion '', da die Koordinate für das Model Name-Attribut eine Menge enthält."
This can be translated by:
"Exception in MDX function '', because the coordinate for the Model Name attribut contains a set"
No exception is thrown when I comment out the calculated measure:
with member [Measures].[SalesMinusTax] as
[Measures].[Internet Sales Amount] - [Measures].[Internet Tax Amount]
select
{
[Measures].[Internet Sales Amount]
,[Measures].[Internet Tax Amount]
//,[Measures].[SalesMinusTax]
}
on 0,
non empty
[Product].[Product].members
*
[Product].[Model Name].members
on 1
from
(
select
[Product].[Model Name].&[All-Purpose Bike Stand]
on 0
from [Adventure Works]
)
--> No Exception
There is also no error if the statement contains the calulcated measure but no subquery:
with member [Measures].[SalesMinusTax] as
[Measures].[Internet Sales Amount] - [Measures].[Internet Tax Amount]
select
{
[Measures].[Internet Sales Amount]
,[Measures].[Internet Tax Amount]
,[Measures].[SalesMinusTax]
}
on 0,
non empty
[Product].[Product].members
*
[Product].[Model Name].members
on 1
from [Adventure Works]
--> No Exception
What causes the problem?
Why is the statement which contains both the subcube and the calculated measure not correct?
Thanks a lot
Saxeten