次の方法で共有


メンバー関数の使用

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

MDX の多くのメンバー関数の中で最も重要なのは、階層の現在のメンバーを決定するために使用される CurrentMember 関数です。 次のクエリは、 ParentAncestorPrevmember 関数と共に使用する方法を示しています。

WITH  
//Returns the name of the currentmember on the Calendar hierarchy  
MEMBER MEASURES.[CurrentMemberDemo] AS [Date].[Calendar].CurrentMember.Name  
//Returns the name of the parent of the currentmember on the Calendar hierarchy  
MEMBER MEASURES.[ParentDemo] AS [Date].[Calendar].CurrentMember.Parent.Name  
//Returns the name of the ancestor of the currentmember on the Calendar hierarchy at the Year level  
MEMBER MEASURES.[AncestorDemo] AS ANCESTOR([Date].[Calendar].CurrentMember, [Date].[Calendar].[Calendar Year]).Name  
//Returns the name of the member before the currentmember on the Calendar hierarchy  
MEMBER MEASURES.[PrevMemberDemo] AS [Date].[Calendar].CurrentMember.Prevmember.Name  
SELECT{MEASURES.[CurrentMemberDemo],MEASURES.[ParentDemo],MEASURES.[AncestorDemo],MEASURES.[PrevMemberDemo] } ON 0,  
[Date].[Calendar].MEMBERS ON 1  
FROM [Adventure Works]  

参照

関数 (MDX 構文)
組関数の使用
集合関数の使用