Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 1.84 KB

File metadata and controls

63 lines (51 loc) · 1.84 KB
title Stdev (MDX) | Microsoft Docs
ms.custom
ms.date 03/02/2016
ms.prod sql-server-2016
ms.reviewer
ms.suite
ms.technology
analysis-services
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
STDEV
dev_langs
kbMDX
helpviewer_keywords
Stdev function [MDX]
ms.assetid c3e31763-18ca-4a2b-bc03-3ee777970c68
caps.latest.revision 33
author Minewiskan
ms.author owend
manager erikre

Stdev (MDX)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]

Returns the sample standard deviation of a numeric expression evaluated over a set, using the unbiased population formula (dividing by n-1).

Syntax

  
Stdev(Set_Expression [ ,Numeric_Expression ] )  

Arguments

Set_Expression
A valid Multidimensional Expressions (MDX) expression that returns a set.

Numeric_Expression
A valid numeric expression that is typically a Multidimensional Expressions (MDX) expression of cell coordinates that return a number.

Remarks

The Stdev function uses the unbiased population formula, while the StdevP function uses the biased population formula.

Example

The following example returns the standard deviation for Internet Order Quantity, evaluated over the first three months of calendar year 2003, using the unbiased population formula.

WITH MEMBER Measures.x AS   
   Stdev   
   ( { [Date].[Calendar].[Month].[January 2003],  
       [Date].[Calendar].[Month].[February 2003],  
       [Date].[Calendar].[Month].[March 2003]},  
    [Measures].[Internet Order Quantity])  
SELECT Measures.x ON 0  
FROM [Adventure Works]  

See Also

MDX Function Reference (MDX)