Function percentile
percentile(
attribute,percentileValue,name?):CalculatedMeasure
Calculates the nth percentile value of the given numeric attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
attribute | Attribute | Attribute to aggregate |
percentileValue | number | Percentile as a fraction between 0 and 1 (e.g. 0.9 for the 90th percentile) |
name? | string | Optional name for the new measure |
Returns
A measure instance
Example
Calculate the 90th percentile of the cost attribute.
measureFactory.percentile(DM.Commerce.Cost, 0.9)