percentile_array_tdigest()
Learn how to use the percentile_array_tdigest() to calculate the percentile value of an expression.
Calculates the percentile result from the tdigest results (which was generated by tdigest() or tdigest_merge())
Syntax
percentiles_array_tdigest(tdigest, percentile1 [, percentile2, …])
percentiles_array_tdigest(tdigest, Dynamic array [, typeLiteral ])
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tdigest | string | ✔️ | The tdigest or tdigest_merge() results used to calculate the percentiles. |
| percentile | real | ✔️ | A value or comma-separated list of values that specifies the percentiles. |
| Dynamic array | dynamic | ✔️ | A dynamic array of real numbers that specify the percentiles. |
| typeLiteral | string | A type literal. For example, typeof(long). If provided, the result set is of this type. |
Returns
The percentile/percentiles value of each value in tdigest.
a dynamic array that includes the results. (such like percentiles())
Examples
StormEvents
| summarize tdigestRes = tdigest(DamageProperty) by State
| project percentiles_array_tdigest(tdigestRes, range(0, 100, 50), typeof(int))
Output
| percentile_tdigest_tdigestRes |
|---|
| [0,0,0] |
| [0,0,62000000] |
| [0,0,110000000] |
| [0,0,1200000] |
| [0,0,250000] |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.