Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDX Not calculating properly with SQL2005 SP2

Status
Not open for further replies.

crystalempress

Programmer
Oct 16, 2003
17
US
We use ProClarity as our front end to display our cubes and are in the process of upgrading from 6.2 to 6.3. In this process we are also putting Analysis Services on a New Server which has SQL 2005. Our current Live Server has SQL 2005 with SP1. Our New Server has SQL 2005 with SP2. There is a pretty obvious difference with the SP's but I would not expect calcuations to be that different.

I have this MDX which is From our Live Server and in SQL Managment I open up a Query Window in Analysis Services on both of the servers stated above. Plug in the below MDX:

---------------------------------------------------------
WITH MEMBER [Written Date].[Fiscal].[All Fiscal Dates].[ Aggregation]
AS ' SUM( EXISTING { [YTD Months - Written Fiscal] }) ', SOLVE_ORDER = 0
MEMBER [Current Territory].[Current Territory].[All Territories].[ Subtotal]
AS ' SUM( EXISTING { [Current Territory].[Current Territory].[Sales Unit].&[DOE],
[Current Territory].[Current Territory].[Sales Unit].&[DOW],
[Current Territory].[Current Territory].[Sales Unit].&[HOS],
[Current Territory].[Current Territory].[Sales Unit].&[NATL],
[Current Territory].[Current Territory].[Sales Unit].&[STAL],
[Current Territory].[Current Territory].[Sales Unit].&[TGCS] }) ', SOLVE_ORDER = 1000
SELECT { { { [Written Date].[Date Calculations].[Fiscal MTD] } *
{ [Measures].[Total Sales], [Measures].[Fiscal Budget Dollar], [Measures].[Fiscal Sales Budget Variance] } } }
ON COLUMNS ,

NON EMPTY { { [Current Territory].[Current Territory].[Sales Unit].&[DOE],
[Current Territory].[Current Territory].[Sales Unit].&[DOW],
[Current Territory].[Current Territory].[Sales Unit].&[HOS],
[Current Territory].[Current Territory].[Sales Unit].&[NATL],
[Current Territory].[Current Territory].[Sales Unit].&[STAL],
[Current Territory].[Current Territory].[Sales Unit].&[TGCS] },
{ [Current Territory].[Current Territory].[All Territories].[ Subtotal] } } ON ROWS

FROM [Sales]

WHERE ( [Written Date].[Fiscal].[All Fiscal Dates].[ Aggregation] )
CELL PROPERTIES VALUE, FORMATTED_VALUE, CELL_ORDINAL, ACTION_TYPE
-------------------------------------------------------
The results I get back are totally off.
Example: Live Server
-------------------------------------------------------
Total Sales Fiscal Budget Fiscal Budget
Dollar Variance
NATL $39,688,942.53 $44,501,565.42 -10.81%
-------------------------------------------------------

Example: New Server(same exact query, same numbers totally differnt results.
-------------------------------------------------------
Total Sales Fiscal Budget Fiscal Budget
Dollar Variance
NATL $39,688,942.53 $44,501,565.42 -63.57%
-------------------------------------------------------

Here is the Fiscal Budget Variance Calculated Member:
-------------------------------------------------------
IIF([Measures].[Total Sales with accruals] = 0, NULL, IIF([Measures].[Fiscal Budget Dollar] = 0, NULL, ([Measures].[Total Sales] / [Measures].[Fiscal Budget Dollar]) - 1))
-------------------------------------------------------

Is there something that happened in SP2 that is causing my Fiscal Budget Variance to be 'way off'.

Any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top