2
votes

I am having issues when running the query:

WITH MEMBER [Measures].[Test1] AS
(
SUM({NONEMPTY(EXISTING(([Product].[Product].[All].Children,[Month].[Month].[All].Children])),  [Measures].[Measure1])}, [Measures].[Measure1])
)
SELECT {[Measures].[Test1],[Measure1]} ON 0
([Product].[Product].Children) ON 1
FROM
[CUBE]
WHERE
([Month].[Month].[Jan]:[Month].[Month].[Dec])

Based on my limited knowledge of MDX, I assume [Test1] and [Measure1] should return the same results.

Depending on what I put in the where clause (i.e. I change the months) I can get no results for [Test1], even if there are values for [Measure1].

If I change [Measure1] to another measure from the same fact table [Measure2] this problem does not occur.

[Measure1] is just a standard measure, it is not calculated or scoped, etc. I know NONEMPTY doesn't need to be there and the query works as expected if I remove it, but I would like to know why it seems to filter out non-empty data.

2

2 Answers

1
votes

Gents (and ladies), it looks like this is actually a Microsft Analysis Services Bug. http://support.microsoft.com/kb/2606211 I installed the cumulative update and it has resolved this issue.

0
votes

Well I would remove the existing. I see no reason for using it and it may cause the error, according to

By default, sets are evaluated within the context of the cube that contains the members of the set. The Existing keyword forces a specified set to be evaluated within the current context instead.

Source

It seems that your query is executed in another context.