Home > Archive > MS SQL Server OLAP > March 2006 > Incorrect Results in MDX









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Incorrect Results in MDX
Faraz

2006-03-29, 11:30 am

In the following query i m just trying to apply standard deviation
function, if i apply a FORMAT_STRING property then i get -1.#IND in
some cell results. Why it is giving this result? and if i do not apply
any FORMAT_STRING property then it gives me -1 as a rsult in the same
cell ? Std Dev cannot be negative :( . whats the problem.

If i try to calculate the stdev for the same data in EXCEL its giving
me correct result ? whats is the problem with STDEV function ? and how
can i resolve this PROBELM ?


Thanks in advance,
Faraz


---------------------------------------------------------------------------=
=AD-------------------

-- QUERY START
---------------------------------------------------------------------------=
=AD-------------------



With MEMBER [Position].[-STDEV] AS
' IIF (IsNumeric(STDEV ({[Position].[Management Role].[Senior
Management],[Position].[Management Role].[Middle
Management],[Position].[Management Role].[Store Management],
[Position].[Management Role].[Store Temp Staff],[Position].[Management
Role].[Store Full Time Staf]},Measures.CurrentMember) ) AND ( STDEV
({[Position].[Management Role].[Senior
Management],[Position].[Management Role].[Middle
Management],[Position].[Management Role].[Store Management],
[Position].[Management Role].[Store Temp Staff],[Position].[Management
Role].[Store Full Time Staf]},Measures.CurrentMember) > 0 ),STDEV
({[Position].[Management Role].[Senior
Management],[Position].[Management Role].[Middle
Management],[Position].[Management Role].[Store Management],
[Position].[Management Role].[Store Temp Staff],[Position].[Management
Role].[Store Full Time Staf]},Measures.CurrentMember), 0 ) ',
SOLVE_ORDER =3D 10001
---------------------------------------------------
-- FORMAT STRING IS COMMMENTED
--, FORMAT_STRING=3D '###.#####'
----------------------------------------------------
SELECT {{[Employees].[CEO].[Sheri Nowmer].CHILDREN}} ON COLUMNS ,
{{[Position].[Management Role].[Senior Management],
[Position].[Management Role].[Middle Management],[Position].[Management

Role].[Store Management],[Position].[Management Role].[Store Temp
Staff],
[Position].[Management Role].[Store Full Time
Staf],[Position].[-STDEV]}} ON ROWS
FROM [HR]
WHERE ([Measures].[MeasuresLevel].[Count]) CELL PROPERTIES
[VALUE],& #91;FORMATTED_VALUE]
,[CELL_ORDINAL]


---------------------------------------------------------------------------=
=AD-------------------

-- QUERY END
---------------------------------------------------------------------------=
=AD-------------------

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com