최종 기간
Essbase에 대한 MDX LastPeriods 함수는 지정된 멤버 또는 Time 차원의 현재 멤버에서 끝나는 멤버 세트를 반환합니다.
구문
LastPeriods ( numeric value expression [, member [, hierarchy ] ] )매개변수
예제
Lastperiods(3, Apr)는 세트 {Feb, Mar, Apr}를 반환합니다.
Lastperiods(-3, Apr)는 세트 {Apr, May, Jun}를 반환합니다.
Lastperiods(1, Apr)는 하나의 멤버 {Apr} 집합을 반환합니다.
Lastperiods(0, Apr)는 빈 세트를 반환합니다.
Lastperiods(5, Apr)는 세트 {Jan, Feb, Mar, Apr}를 반환합니다. 출력 집합에는 네 개의 멤버만 있습니다.
다음 질의를 실행합니다.
WITH MEMBER
[Measures].[Rolling Sales] AS
'Avg (
LastPeriods
(3, [Year].Currentmember
),
[Measures].[Sales]
)'
SELECT
{[Measures].[Sales], [Measures].[Rolling Sales]}
ON COLUMNS,
Descendants ([Year].[Qtr2])
ON ROWS
FROM Sample.Basic
WHERE [Product].[Root Beer]그리드 반환:
표 4-104 MDX의 출력 그리드 예
| (axis) | 판매 | 연속 판매 |
|---|---|---|
| Qtr2 | 27401 | 27014 |
| 4월 | 8969 | 8960 |
| 5월 | 9071 | 8997 |
| 6월 | 9361 | 9133.667 |