튜플 함수 사용

튜플 함수는 집합에서 튜플을 검색하거나 튜플의 문자열 표현을 확인하여 튜플을 검색합니다.

멤버 함수 및 집합 함수와 같은 튜플 함수는 Analysis Services에 있는 다차원 구조를 협상하는 데 필수적입니다.

MDX, 현재(MDX), Item(튜플)(MDX) 및 MDX(StrToTuple)에는 세 가지 튜플 함수가 있습니다. 다음 예제 쿼리는 각 쿼리를 사용하는 방법을 보여줍니다.

WITH

//Creates a set of tuples consisting of Years and Countries

SET MyTuples AS [Date].[Calendar Year].[Calendar Year].MEMBERS * [Customer].[Country].[Country].MEMBERS

//Returns a string representation of that set using the Current and Generate functions

MEMBER MEASURES.CURRENTDEMO AS GENERATE(MyTuples, TUPLETOSTR(MyTuples.CURRENT), ", ")

//Retrieves the fourth tuple from that set and displays it as a string

MEMBER MEASURES.ITEMDEMO AS TUPLETOSTR(MyTuples.ITEM(3))

//Creates a tuple consisting of the measure Internet Sales Amount and the country Australia from a string

MEMBER MEASURES.STRTOTUPLEDEMO AS STRTOTUPLE("([Measures].[Internet Sales Amount]" + ", [Customer].[Country].&[Australia])")

SELECT{MEASURES.CURRENTDEMO,MEASURES.ITEMDEMO,MEASURES.STRTOTUPLEDEMO} ON COLUMNS

FROM [Adventure Works]

참고 항목

함수(MDX 구문)
멤버 함수 사용
집합 함수 사용