OpenBI Docs Buy

SKEW.S OpenBI

How lopsided a column's numbers are, taken as a sample of more: the sample skewness, as Excel's SKEW.

Skewness says which way the values lean: 0 for a symmetric spread, positive when a few large values make a long tail to the right (most order sizes, most prices), negative for a long tail to the left.

Group: Aggregation. OpenBI’s own: DAX has no function of this name.

Syntax

SKEW.S ( <ColumnName> )
ParameterTypeDescription
ColumnNameColumnA column of numbers.

Returns

Number. The sample skewness of the column's values in the filter context; BLANK for fewer than three values, or when they are all equal.

Remarks

  • The sample skewness, the one Excel's SKEW gives: the population's skewness (SKEW.P) times √(n (n − 1)) ÷ (n − 2), for n values. The factor makes up for a small sample, and comes close to 1 as n grows.
  • Blanks are left out. Fewer than three values, or values that are all the same, give BLANK.
  • Use SKEW.P when the values are all there is (every shop, not a sample of shops), and SKEWX.S for an expression worked out row by row.

Compared with DAX

An OpenBI function: DAX has none like it, so a measure or query that uses it works in OpenBI only, not in Power BI or Analysis Services.

Excel's SKEW gives the same number for the same values.

Examples

The prices per liter

Four products cost 30, 38, 52 and 64 per liter: one expensive beer pulls the tail to the right.

EVALUATE
ROW (
    "Sample", SKEW.S ( Products[Price per liter] ),
    "Population", SKEW.P ( Products[Price per liter] )
)
SamplePopulation
0.2813129636421480.162416115285325

Fewer than three values

Only one product is a cider, so there is no skewness to work out.

EVALUATE
ROW (
    "Cider", CALCULATE ( SKEW.S ( Products[Price per liter] ), Products[Category] = "Cider" ),
    "Beer", CALCULATE ( SKEW.S ( Products[Price per liter] ), Products[Category] = "Beer" )
)
CiderBeer
(blank)1.34583299541151

SKEW.P, SKEWX.S, KURT.S, STDEV.S.

Last updated · OpenBI Studio 0.3.78