OpenBI Docs Buy

SKEWX.S OpenBI

How lopsided an expression's results over a table's rows are, taken as a sample: the sample skewness.

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

SKEWX.S ( <table>, <expression> )
ParameterTypeDescription
tableTableThe rows to go through.
expressionExpression
evaluated for each row
The number worked out for each row.

Returns

Number. The sample skewness of the results; BLANK for fewer than three, 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.
  • Rows where the expression is blank are left out; fewer than three results, or results that are all the same, give BLANK.

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

Eight values as a sample and as all there is

EVALUATE
ROW (
    "Sample", SKEWX.S ( DATATABLE ( "Value", INTEGER, { { 2 }, { 4 }, { 4 }, { 4 }, { 5 }, { 5 }, { 7 }, { 9 } } ), [Value] ),
    "Population", SKEWX.P ( DATATABLE ( "Value", INTEGER, { { 2 }, { 4 }, { 4 }, { 4 }, { 5 }, { 5 }, { 7 }, { 9 } } ), [Value] )
)
SamplePopulation
0.81848755335680.65625

Monthly liters of each product

Does a product sell steadily, or have a few big months?

EVALUATE
SUMMARIZECOLUMNS (
    Products[Product],
    "Skewness", SKEWX.S ( VALUES ( Sales[Month] ), [Liters sold] )
)
ORDER BY Products[Product]
Products[Product]Skewness
Cider1.03339422943615
IPA1.12590261306853
Lettøl1.04607250801285
Pils0.69242293609049

A blank row is left out

EVALUATE
ROW (
    "With a blank", SKEWX.S ( DATATABLE ( "Value", INTEGER, { { 1 }, { 2 }, { BLANK () }, { 10 } } ), [Value] ),
    "Without", SKEWX.S ( DATATABLE ( "Value", INTEGER, { { 1 }, { 2 }, { 10 } } ), [Value] )
)
With a blankWithout
1.652316740332991.65231674033299

SKEWX.P, SKEW.S, KURTX.S, STDEVX.S.

Last updated · OpenBI Studio 0.3.78