SKEW.P OpenBI
How lopsided a column's numbers are when they are all there is: the population skewness, as Excel's SKEW.P.
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.P ( <ColumnName> )
| Parameter | Type | Description |
|---|---|---|
ColumnName | Column | A column of numbers. |
Returns
Number. The population skewness of the column's values in the filter context; BLANK for fewer than three values, or when they are all equal.
Remarks
- The population skewness, the one Excel's
SKEW.Pgives: the mean of the cubed differences from the mean, divided by the population standard deviation cubed - √n × s3 ÷ s2^1.5, where s2 and s3 add up the squared and cubed differences of the n values from their mean. - Blanks are left out. Fewer than three values, or values that are all the same, give BLANK, as Excel's
SKEW.Pgives an error for them. - Its result is a little closer to 0 than
SKEW.Sgives for the same values; the two come together as the number of values grows.
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.P gives the same number for the same values.
Examples
The prices per liter, both ways
EVALUATE
ROW (
"Population", SKEW.P ( Products[Price per liter] ),
"Sample", SKEW.S ( Products[Price per liter] )
)
| Population | Sample |
|---|---|
| 0.162416115285325 | 0.281312963642148 |
Each category's prices
Beer has three products; cider one, too few.
EVALUATE
ADDCOLUMNS (
VALUES ( Products[Category] ),
"Skewness", CALCULATE ( SKEW.P ( Products[Price per liter] ) )
)
ORDER BY Products[Category]
| Products[Category] | Skewness |
|---|---|
| Beer | 0.549434019626609 |
| Cider | (blank) |