최하위 퍼센트
The MDX BottomPercent function for Essbase returns the smallest possible subset of a set for which the total results of a numeric evaluation are at least a given percentage. The result set is returned with elements listed from smallest to largest.
구문
BottomPercent ( set, percentage, numeric_value_expression )매개변수
노트
이 함수는 음수 및 누락된 값을 무시합니다.
예제
다음 질의는 Sample Basic 데이터베이스에서 모든 제품 판매의 가장 낮은 5번째 백분위수를 구성하는 제품에 대한 데이터를 반환합니다.
WITH
SET [Lowest 5% products] AS
'BottomPercent (
{ [Product].members },
5,
([Measures].[Sales], [Year].[Qtr2])
)'
MEMBER
[Product].[Sum of all lowest prods] AS
'Sum ( [Lowest 5% products] )'
MEMBER [Product].[Percent that lowest sellers hold of all product sales] AS
'Sum ( [Lowest 5% products] ) / [Product] '
SELECT
{[Year].[Qtr2].children}
on columns,
{
[Lowest 5% products],
[Product].[Sum of all lowest prods],
[Product],
[Product].[Percent that lowest sellers hold of all product sales]
}
on rows
FROM Sample.Basic
WHERE ([Measures].[Sales])WITH 섹션에서
-
명명된 세트
[Lowest 5% products]는 2분기에 판매의 가장 낮은 5%를 차지하는 제품으로 구성됩니다. 이 세트에는 버치 맥주, 카페인 프리 콜라, 딸기, 사스파릴라 및 바닐라 크림이 포함됩니다. -
첫 번째 계산된 멤버인
[Product].[Sum of all lowest prods]는 판매가 가장 낮은 5번째 백분위수의 제품 판매 합계를 표시하는 데 사용됩니다. -
두 번째 계산된 멤버인
[Product].[Percent that lowest sellers hold of all product sales]는 매월 최저 판매 제품의 판매가 제품 차원의 모든 제품의 판매와 비교되는 방식(퍼센트로 표시)을 표시하는 데 사용됩니다.
이 질의는 다음 그리드를 반환합니다.
표 4-41 MDX의 출력 그리드 예
| (axis) | 4월 | 5월 | 6월 |
|---|---|---|---|
| 버치 비어 | 954 | 917 | 1051 |
| 무카페인 콜라 | 1049 | 1065 | 1068 |
| 딸기 | 1314 | 1332 | 1316 |
| 사르사파릴라 | 1509 | 1552 | 1501 |
| 바닐라 크림 | 1493 | 1533 | 1612 |
| 모든 최하위 구매의 합계 | 6319 | 6399 | 6548 |
| 제품 | 32917 | 33674 | 35088 |
| 최하위 판매자가 모든 제품 판매를 보유하는 퍼센트 | 0.192 | 0.194 | 0.187 |
참조 항목