# DStDev 和 DStDevP 函数

DStDev ( expr ， domain [ ，criteria] )

DStDevP ( expr ， domain [ ，criteria] )

DStDev 和 DStDevP函数具有以下参数：

expr

## 备注

>(DStDev("[Freight]", "Orders") + DAvg("[Freight]", "Orders"))

=DStDev("[Freight]", "Orders", "[ShipRegion] = 'CA'")

## 查询示例

SELECT DStDev ("unitprice"、"productSales"、"unitprice>140") AS Expr1， DStDevP ("单价"，"productSales"，"单价<140") AS Expr2 FROM productSales GROUP BY DStDev ("单价"，"productSales"，"单价>140") ， DStDevP ("单价"、"产品销售"、"单价<140") ;

SELECT DStDev ("单价"、"productSales"、"unitprice>140") AS DstDev， DStDevP ("单价"，"productSales"，"单价<140") AS DstDevP FROM productSales GROUP BY DStDev ("单价"，"productSales"，"单价>140") ， DStDevP ("单价"、"产品销售"、"单价<140") ;

## VBA 示例

``` Dim dblX As DoubleDim dblY As Double' Sample estimate.dblX = DStDev("[Freight]", "Orders", _ "[ShipCountryRegion] = 'UK'")' Population estimate.dblY = DStDevP("[Freight]", "Orders", _ "[ShipCountryRegion] = 'UK'") ```

``` Dim strCountryRegion As StringDim dblX As DoubleDim dblY As DoublestrCountryRegion = "UK"dblX = DStDev("[Freight]", "Orders", _ "[ShipCountryRegion] = '" & strCountryRegion & "'")dblY = DStDevP("[Freight]", "Orders", _ "[ShipCountryRegion] = '" & strCountryRegion & "'") ```

×