Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX query returns different results in SQL 2012 and SQL 2008

$
0
0

The following MDX query seems to return qualitatively different results when run against SSAS 2012 and SSAS 2008:

with member measures.x as 
	aggregate(
		[Customer].[Total Children].[Total Children]
		, [Measures].[Internet Sales Amount])
select 
	{[Measures].[Internet Sales Amount], measures.x} on columns,
	[Customer].[Customer].[Customer] on rows
from [Adventure Works]

I would expect that the aggregation over [Customer].[Total Children].[Total Children] in a context of a given customer would return the sales for that customer. That is, [Measures].[Internet Sales Amount] = measures.x for each row. This is not the case.

In SQL Server 2008, I am seeing these results:

Aaron A. Allen   $3,399.99  $29,358,677.22
Aaron A. Hayes   $3,112.97  $29,358,677.22
Aaron A. Zhang     $600.46  $29,358,677.22
Aaron Alexander     $69.99  $29,358,677.22
Aaron B. Adams     $117.96  $29,358,677.22
...

In SQL Server 2012, I am seeing the following:

Aaron A. Allen   $3,399.99  $3,399.99
Aaron A. Hayes   $3,112.97  $3,112.97Aaron A. Zhang     $600.46  $4,110.39
Aaron Alexander     $69.99     $69.99
Aaron B. Adams     $117.96    $184.90
...

Please, note the bold row (Aaron A. Zhang), where [Measures].[Internet Sales Amount]<> measures.x 

SSAS 2008 build is 9.00.4035.00

SSAS 2012 build is 11.0.3000

Can you, please, explain, why is the behaviour different, and, most importantly, why is it different from my expectation (which is obviously wrong in this case).

Thanks!



Viewing all articles
Browse latest Browse all 14337

Trending Articles