中位數
Essbase 的 MDX 中位數函數會根據數值表示式排序集合,然後傳回集合中位數元組的值。
語法
Median ( set, numeric_value_expr )備註
這個函數是 Percentile 函數的特殊案例,其中 n = 50。
範例
下列查詢傳回去年所有州中已付無線電台的中位數價格:
WITH MEMBER
[Geography].[Median Mkt Price]
AS
'Median ( [Geography].Levels(2).Members, [Measures].[Price Paid])'
SELECT
{ [Geography].[Median Mkt Price]}
ON COLUMNS
FROM
ASOSamp.Basic
WHERE ([Products].[Radios], [Years].[Prev Year] )