次の方法で共有


組関数の使用

タプル関数は、セットからタプルを取得するか、タプルの文字列表現を解決してタプルを取得します。

メンバー関数や set 関数などのタプル関数は、Analysis Services で見つかった多次元構造のネゴシエートに不可欠です。

MDX には、 Current (MDX)Item (Tuple) (MDX)StrToTuple (MDX) の 3 つのタプル関数があります。 次のクエリ例は、それぞれの使用方法を示しています。

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 構文)
メンバー関数の使用
集合関数の使用