Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem Measure Calculated dynamically (error #VALUE!) Expand / Collapse
Author
Message
Posted Thursday, April 4, 2013 3:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 4, 2013 11:05 AM
Points: 2, Visits: 10
Hello,

I have a problem to calculate the variance.

Here is the code I use:
Axis([Measures]).item(0)-Axis([Measures]).item(1)

Dynamically, the calculated measure makes the subtraction between the first measure and the second measure.

On the other hand, when that I add dimensions, an error displays.

Help !

Thank you very much.
Post #1438706
Posted Thursday, April 4, 2013 10:30 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 12, 2014 10:57 PM
Points: 458, Visits: 857
walter.anto (4/4/2013)
Hello,

I have a problem to calculate the variance.

Here is the code I use:
Axis([Measures]).item(0)-Axis([Measures]).item(1)

Dynamically, the calculated measure makes the subtraction between the first measure and the second measure.

On the other hand, when that I add dimensions, an error displays.

Help !

Thank you very much.


The axis function seems like overkill for the requirement. How about :

WITH Member [Measures].[ItemVariance] as
(
[Measures].[Name of First Measure] - [Measures].[Name of Second Measure]
)



I wonder about it being called variance though. Variance is a statistical value related to standard deviation (standard deviation squared).
Subtracting one from the other would be the "difference".
Post #1439088
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse